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
spbro
OpenXG-RAN
Commits
ed1c87b5
Commit
ed1c87b5
authored
Mar 14, 2022
by
Laurent THOMAS
Committed by
Robert Schmidt
Mar 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit before rebase
parent
3be77c09
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
125 additions
and
192 deletions
+125
-192
cmake_targets/phy_simulators
cmake_targets/phy_simulators
+0
-1
common/utils/lte/ue_power.c
common/utils/lte/ue_power.c
+2
-4
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+6
-3
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+9
-14
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+1
-1
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+52
-40
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+7
-2
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+3
-5
openair1/PHY/TOOLS/dB_routines.h
openair1/PHY/TOOLS/dB_routines.h
+0
-35
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+13
-9
openair1/SCHED/sched_common_vars.h
openair1/SCHED/sched_common_vars.h
+1
-0
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+16
-48
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+0
-5
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+2
-1
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+10
-14
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+2
-10
No files found.
cmake_targets/phy_simulators
deleted
120000 → 0
View file @
3be77c09
ran_build/
\ No newline at end of file
common/utils/lte/ue_power.c
View file @
ed1c87b5
...
@@ -33,10 +33,8 @@
...
@@ -33,10 +33,8 @@
#include <stdint.h>
#include <stdint.h>
#include <stdio.h>
#include <stdio.h>
#include "PHY/defs_eNB.h"
#include "PHY/defs_eNB.h"
#include "PHY/TOOLS/dB_routines.h"
#include <openair1/PHY/TOOLS/tools_defs.h>
#include <openair1/SCHED/sched_common_extern.h>
extern
int16_t
hundred_times_delta_TF
[
100
];
extern
uint16_t
hundred_times_log10_NPRB
[
100
];
int16_t
estimate_ue_tx_power
(
int
norm
,
uint32_t
tbs
,
uint32_t
nb_rb
,
uint8_t
control_only
,
int
ncp
,
uint8_t
use_srs
)
int16_t
estimate_ue_tx_power
(
int
norm
,
uint32_t
tbs
,
uint32_t
nb_rb
,
uint8_t
control_only
,
int
ncp
,
uint8_t
use_srs
)
{
{
...
...
executables/nr-uesoftmodem.c
View file @
ed1c87b5
...
@@ -241,14 +241,17 @@ nrUE_params_t *get_nrUE_params(void) {
...
@@ -241,14 +241,17 @@ nrUE_params_t *get_nrUE_params(void) {
}
}
/* initialie thread pools used for NRUE processing paralleliation */
/* initialie thread pools used for NRUE processing paralleliation */
void
init_tpools
(
uint8_t
nun_dlsch_threads
)
{
void
init_tpools
(
uint8_t
nun_dlsch_threads
)
{
char
*
params
=
NULL
;
char
params
[
NR_RX_NB_TH
*
NR_NB_TH_SLOT
*
3
+
1
];
params
=
calloc
(
1
,(
NR_RX_NB_TH
*
NR_NB_TH_SLOT
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
*
NR_NB_TH_SLOT
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
*
NR_NB_TH_SLOT
;
i
++
)
{
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
}
if
(
getenv
(
"noThreads"
))
{
initTpool
(
"n"
,
&
(
nrUE_params
.
Tpool
),
false
);
init_dlsch_tpool
(
0
);
}
else
{
initTpool
(
params
,
&
(
nrUE_params
.
Tpool
),
false
);
initTpool
(
params
,
&
(
nrUE_params
.
Tpool
),
false
);
free
(
params
);
init_dlsch_tpool
(
nun_dlsch_threads
);
init_dlsch_tpool
(
nun_dlsch_threads
);
}
}
}
static
void
get_options
(
void
)
{
static
void
get_options
(
void
)
{
...
...
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
View file @
ed1c87b5
...
@@ -107,25 +107,20 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
...
@@ -107,25 +107,20 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_gNB_COMMON
*
common_vars
=
&
gNB
->
common_vars
;
NR_gNB_COMMON
*
common_vars
=
&
gNB
->
common_vars
;
PHY_MEASUREMENTS_gNB
*
measurements
=
&
gNB
->
measurements
;
PHY_MEASUREMENTS_gNB
*
measurements
=
&
gNB
->
measurements
;
int
rb
,
offset
,
offset0
,
nb_symb
[
275
],
len
;
int
rb
,
nb_symb
[
275
]
=
{
0
};
int32_t
*
ul_ch
;
memset
(
measurements
->
n0_subband_power
,
0
,
sizeof
(
measurements
->
n0_subband_power
));
LOG_D
(
PHY
,
"slot %d Doing I0 for first_symb %d, num_symb %d
\n
"
,
slot
,
first_symb
,
num_symb
);
for
(
int
s
=
first_symb
;
s
<
(
first_symb
+
num_symb
);
s
++
)
{
for
(
int
s
=
first_symb
;
s
<
(
first_symb
+
num_symb
);
s
++
)
{
for
(
rb
=
0
;
rb
<
frame_parms
->
N_RB_UL
;
rb
++
)
{
for
(
rb
=
0
;
rb
<
frame_parms
->
N_RB_UL
;
rb
++
)
{
int
offset0
=
(
slot
&
3
)
*
(
frame_parms
->
symbols_per_slot
*
frame_parms
->
ofdm_symbol_size
)
+
if
(
s
==
first_symb
)
{
(
frame_parms
->
first_carrier_offset
+
(
rb
*
12
))
%
frame_parms
->
ofdm_symbol_size
;
nb_symb
[
rb
]
=
0
;
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
measurements
->
n0_subband_power
[
aarx
][
rb
]
=
0
;
}
offset0
=
(
slot
&
3
)
*
(
frame_parms
->
symbols_per_slot
*
frame_parms
->
ofdm_symbol_size
)
+
(
frame_parms
->
first_carrier_offset
+
(
rb
*
12
))
%
frame_parms
->
ofdm_symbol_size
;
if
((
gNB
->
rb_mask_ul
[
s
][
rb
>>
5
]
&
(
1
<<
(
rb
&
31
)))
==
0
)
{
// check that rb was not used in this subframe
if
((
gNB
->
rb_mask_ul
[
s
][
rb
>>
5
]
&
(
1
<<
(
rb
&
31
)))
==
0
)
{
// check that rb was not used in this subframe
nb_symb
[
rb
]
++
;
nb_symb
[
rb
]
++
;
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
offset
=
offset0
+
(
s
*
frame_parms
->
ofdm_symbol_size
);
int
offset
=
offset0
+
(
s
*
frame_parms
->
ofdm_symbol_size
);
ul_ch
=
&
common_vars
->
rxdataF
[
aarx
][
offset
];
int32_t
*
ul_ch
=
&
common_vars
->
rxdataF
[
aarx
][
offset
];
len
=
12
;
int
len
=
12
;
if
(((
frame_parms
->
N_RB_UL
&
1
)
==
1
)
&&
if
(((
frame_parms
->
N_RB_UL
&
1
)
==
1
)
&&
(
rb
==
(
frame_parms
->
N_RB_UL
>>
1
)))
{
(
rb
==
(
frame_parms
->
N_RB_UL
>>
1
)))
{
len
=
6
;
len
=
6
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
ed1c87b5
...
@@ -132,7 +132,7 @@ void nr_generate_dci(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
...
@@ -132,7 +132,7 @@ void nr_generate_dci(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
polar_encoder_fast
((
uint64_t
*
)
dci_pdu
->
Payload
,
(
void
*
)
encoder_output
,
n_RNTI
,
1
,
polar_encoder_fast
((
uint64_t
*
)
dci_pdu
->
Payload
,
(
void
*
)
encoder_output
,
n_RNTI
,
1
,
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_pdu
->
PayloadSizeBits
,
dci_pdu
->
AggregationLevel
);
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_pdu
->
PayloadSizeBits
,
dci_pdu
->
AggregationLevel
);
#if
def DEBUG_CHANNEL_CODING
#if
1
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
dci_pdu
->
PayloadSizeBits
,
pdcch_pdu_rel15
->
dci_pdu
->
AggregationLevel
);
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
dci_pdu
->
PayloadSizeBits
,
pdcch_pdu_rel15
->
dci_pdu
->
AggregationLevel
);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
((
uint64_t
*
)
dci_pdu
->
Payload
)[
0
],
((
uint64_t
*
)
dci_pdu
->
Payload
)[
1
]);
((
uint64_t
*
)
dci_pdu
->
Payload
)[
0
],
((
uint64_t
*
)
dci_pdu
->
Payload
)[
1
]);
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
ed1c87b5
...
@@ -243,7 +243,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -243,7 +243,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
* x(l*12+n) = r_u_v_alpha_delta(n)
* x(l*12+n) = r_u_v_alpha_delta(n)
*/
*/
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
uint8_t
u
[
2
]
=
{
0
,
0
},
v
[
2
]
=
{
0
,
0
};
uint8_t
u
[
2
]
=
{
0
},
v
[
2
]
=
{
0
};
// x_n contains the sequence r_u_v_alpha_delta(n)
// x_n contains the sequence r_u_v_alpha_delta(n)
...
@@ -262,7 +262,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -262,7 +262,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
AssertFatal
(
pucch_pdu
->
nr_of_symbols
<
3
,
"nr_of_symbols %d not allowed
\n
"
,
pucch_pdu
->
nr_of_symbols
);
AssertFatal
(
pucch_pdu
->
nr_of_symbols
<
3
,
"nr_of_symbols %d not allowed
\n
"
,
pucch_pdu
->
nr_of_symbols
);
uint32_t
re_offset
[
2
]
=
{
0
,
0
};
uint32_t
re_offset
[
2
]
=
{
0
};
uint8_t
l2
;
uint8_t
l2
;
const
int16_t
*
x_re
[
2
],
*
x_im
[
2
];
const
int16_t
*
x_re
[
2
],
*
x_im
[
2
];
...
@@ -271,16 +271,11 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -271,16 +271,11 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
x_re
[
1
]
=
table_5_2_2_2_2_Re
[
u
[
1
]];
x_re
[
1
]
=
table_5_2_2_2_2_Re
[
u
[
1
]];
x_im
[
1
]
=
table_5_2_2_2_2_Im
[
u
[
1
]];
x_im
[
1
]
=
table_5_2_2_2_2_Im
[
u
[
1
]];
int16_t
xr
[
1
+
frame_parms
->
nb_antennas_rx
][
1
+
pucch_pdu
->
nr_of_symbols
][
24
]
__attribute__
((
aligned
(
32
)));
c64_t
xr
[
frame_parms
->
nb_antennas_rx
][
pucch_pdu
->
nr_of_symbols
][
12
]
__attribute__
((
aligned
(
32
)));
memset
(
xr
,
0
,
sizeof
(
xr
));
int64_t
xrtmag
=
0
,
xrtmag_next
=
0
;
int64_t
xrtmag
=
0
,
xrtmag_next
=
0
;
uint8_t
maxpos
=
0
;
uint8_t
maxpos
=
0
;
uint8_t
index
=
0
;
uint8_t
index
=
0
;
for
(
int
l
=
0
;
l
<
pucch_pdu
->
nr_of_symbols
;
l
++
)
{
for
(
int
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
memset
((
void
*
)
xr
[
aarx
][
l
],
0
,
24
*
sizeof
(
int16_t
));
}
}
int
n2
;
for
(
int
l
=
0
;
l
<
pucch_pdu
->
nr_of_symbols
;
l
++
)
{
for
(
int
l
=
0
;
l
<
pucch_pdu
->
nr_of_symbols
;
l
++
)
{
l2
=
l
+
pucch_pdu
->
start_symbol_index
;
l2
=
l
+
pucch_pdu
->
start_symbol_index
;
...
@@ -289,23 +284,23 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -289,23 +284,23 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
re_offset
[
l
]
-=
frame_parms
->
ofdm_symbol_size
;
re_offset
[
l
]
-=
frame_parms
->
ofdm_symbol_size
;
AssertFatal
(
re_offset
[
l
]
+
12
<
frame_parms
->
ofdm_symbol_size
,
"pucch straddles DC carrier, handle this!
\n
"
);
AssertFatal
(
re_offset
[
l
]
+
12
<
frame_parms
->
ofdm_symbol_size
,
"pucch straddles DC carrier, handle this!
\n
"
);
int16_t
*
r
;
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
r
=
(
int16_t
*
)
&
rxdataF
[
aa
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
l
]];
c16_t
*
r
=
(
c16_t
*
)
&
rxdataF
[
aa
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
l
]];
n2
=
0
;
for
(
n
=
0
;
n
<
12
;
n
++
)
{
for
(
n
=
0
;
n
<
12
;
n
++
,
n2
+=
2
)
{
xr
[
aa
][
l
][
n
].
r
+=
(
int32_t
)
x_re
[
l
][
n
]
*
r
[
n
].
r
+
(
int32_t
)
x_im
[
l
][
n
]
*
r
[
n
].
i
;
xr
[
aa
][
l
][
n2
]
+=
(
int16_t
)(((
int32_t
)
x_re
[
l
][
n
]
*
r
[
n2
]
+
(
int32_t
)
x_im
[
l
][
n
]
*
r
[
n2
+
1
])
>>
15
);
xr
[
aa
][
l
][
n
].
i
+=
(
int32_t
)
x_re
[
l
][
n
]
*
r
[
n
].
i
-
(
int32_t
)
x_im
[
l
][
n
]
*
r
[
n
].
r
;
xr
[
aa
][
l
][
n2
+
1
]
+=
(
int16_t
)(((
int32_t
)
x_re
[
l
][
n
]
*
r
[
n2
+
1
]
-
(
int32_t
)
x_im
[
l
][
n
]
*
r
[
n2
])
>>
15
);
#ifdef DEBUG_NR_PUCCH_RX
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"x (%d,%d), r%d.%d (%d,%d), xr (%
d,%
d)
\n
"
,
printf
(
"x (%d,%d), r%d.%d (%d,%d), xr (%
lld,%ll
d)
\n
"
,
x_re
[
l
][
n
],
x_im
[
l
][
n
],
l2
,
re_offset
[
l
],
r
[
n2
],
r
[
n2
+
1
],
xr
[
aa
][
l
][
n2
],
xr
[
aa
][
l
][
n2
+
1
]
);
x_re
[
l
][
n
],
x_im
[
l
][
n
],
l2
,
re_offset
[
l
],
r
[
n
].
r
,
r
[
n
].
i
,
xr
[
aa
][
l
][
n
].
r
,
xr
[
aa
][
l
][
n
].
i
);
#endif
#endif
}
}
xr
[
aa
][
l
][
n
].
r
>>=
15
;
xr
[
aa
][
l
][
n
].
i
>>=
15
;
}
}
}
}
int
32_t
corr_re
[
1
+
frame_parms
->
nb_antennas_rx
][
2
];
int
64_t
corr_re
[
frame_parms
->
nb_antennas_rx
][
2
];
int
32_t
corr_im
[
1
+
frame_parms
->
nb_antennas_rx
][
2
];
int
64_t
corr_im
[
frame_parms
->
nb_antennas_rx
][
2
];
//int32_t no_corr = 0;
//int32_t no_corr = 0;
int
seq_index
=
0
;
int
seq_index
=
0
;
int64_t
temp
;
int64_t
temp
;
...
@@ -322,19 +317,19 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -322,19 +317,19 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
corr_re
[
aa
][
l
]
=
0
;
corr_re
[
aa
][
l
]
=
0
;
corr_im
[
aa
][
l
]
=
0
;
corr_im
[
aa
][
l
]
=
0
;
for
(
n
=
0
;
n
<
12
;
n
++
)
{
n2
=
0
;
corr_re
[
aa
][
l
]
+=
xr
[
aa
][
l
][
n
].
r
*
idft12_re
[
seq_index
][
n
]
+
xr
[
aa
][
l
][
n
].
i
*
idft12_im
[
seq_index
][
n
];
for
(
n
=
0
;
n
<
12
;
n
++
,
n2
+=
2
)
{
corr_im
[
aa
][
l
]
+=
xr
[
aa
][
l
][
n
].
r
*
idft12_im
[
seq_index
][
n
]
-
xr
[
aa
][
l
][
n
].
i
*
idft12_re
[
seq_index
][
n
];
corr_re
[
aa
][
l
]
+=
(
xr
[
aa
][
l
][
n2
]
*
idft12_re
[
seq_index
][
n
]
+
xr
[
aa
][
l
][
n2
+
1
]
*
idft12_im
[
seq_index
][
n
])
>>
15
;
corr_im
[
aa
][
l
]
+=
(
xr
[
aa
][
l
][
n2
]
*
idft12_im
[
seq_index
][
n
]
-
xr
[
aa
][
l
][
n2
+
1
]
*
idft12_re
[
seq_index
][
n
])
>>
15
;
}
}
corr_re
[
aa
][
l
]
>>=
15
;
corr_im
[
aa
][
l
]
>>=
15
;
}
}
}
}
LOG_D
(
PHY
,
"PUCCH IDFT[%d/%d] = (%
d,%
d)=>%f
\n
"
,
LOG_D
(
PHY
,
"PUCCH IDFT[%d/%d] = (%
ld,%l
d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
0
][
0
],
corr_im
[
0
][
0
],
mcs
[
i
],
seq_index
,
corr_re
[
0
][
0
],
corr_im
[
0
][
0
],
10
*
log10
((
double
)
corr_re
[
0
][
0
]
*
corr_re
[
0
][
0
]
+
(
double
)
corr_im
[
0
][
0
]
*
corr_im
[
0
][
0
]));
10
*
log10
((
double
)
corr_re
[
0
][
0
]
*
corr_re
[
0
][
0
]
+
(
double
)
corr_im
[
0
][
0
]
*
corr_im
[
0
][
0
]));
if
(
pucch_pdu
->
nr_of_symbols
==
2
)
if
(
pucch_pdu
->
nr_of_symbols
==
2
)
LOG_D
(
PHY
,
"PUCCH 2nd symbol IDFT[%d/%d] = (%
d,%
d)=>%f
\n
"
,
LOG_D
(
PHY
,
"PUCCH 2nd symbol IDFT[%d/%d] = (%
ld,%l
d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
0
][
1
],
corr_im
[
0
][
1
],
mcs
[
i
],
seq_index
,
corr_re
[
0
][
1
],
corr_im
[
0
][
1
],
10
*
log10
((
double
)
corr_re
[
0
][
1
]
*
corr_re
[
0
][
1
]
+
(
double
)
corr_im
[
0
][
1
]
*
corr_im
[
0
][
1
]));
10
*
log10
((
double
)
corr_re
[
0
][
1
]
*
corr_re
[
0
][
1
]
+
(
double
)
corr_im
[
0
][
1
]
*
corr_im
[
0
][
1
]));
if
(
pucch_pdu
->
freq_hop_flag
==
0
)
{
if
(
pucch_pdu
->
freq_hop_flag
==
0
)
{
...
@@ -392,7 +387,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -392,7 +387,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_stats
->
pucch0_n01
=
gNB
->
measurements
.
n0_subband_power_tot_dB
[
prb_offset
[
1
]];
uci_stats
->
pucch0_n01
=
gNB
->
measurements
.
n0_subband_power_tot_dB
[
prb_offset
[
1
]];
LOG_D
(
PHY
,
"n00[%d] = %d, n01[%d] = %d
\n
"
,
prb_offset
[
0
],
uci_stats
->
pucch0_n00
,
prb_offset
[
1
],
uci_stats
->
pucch0_n01
);
LOG_D
(
PHY
,
"n00[%d] = %d, n01[%d] = %d
\n
"
,
prb_offset
[
0
],
uci_stats
->
pucch0_n00
,
prb_offset
[
1
],
uci_stats
->
pucch0_n01
);
// estimate CQI for MAC (from antenna port 0 only)
// estimate CQI for MAC (from antenna port 0 only)
int
max_n0
=
uci_stats
->
pucch0_n00
>
uci_stats
->
pucch0_n01
?
uci_stats
->
pucch0_n00
:
uci_stats
->
pucch0_n01
;
int
max_n0
=
max
(
gNB
->
measurements
.
n0_subband_power_tot_dB
[
prb_offset
[
0
]],
gNB
->
measurements
.
n0_subband_power_tot_dB
[
prb_offset
[
1
]]);
int
SNRtimes10
,
sigenergy
=
0
;
int
SNRtimes10
,
sigenergy
=
0
;
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
sigenergy
+=
signal_energy_nodc
(
&
rxdataF
[
aa
][
soffset
+
sigenergy
+=
signal_energy_nodc
(
&
rxdataF
[
aa
][
soffset
+
...
@@ -407,8 +403,16 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -407,8 +403,16 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_stats
->
pucch0_thres
=
gNB
->
pucch0_thres
;
/* + (10*max_n0);*/
uci_stats
->
pucch0_thres
=
gNB
->
pucch0_thres
;
/* + (10*max_n0);*/
bool
no_conf
=
false
;
bool
no_conf
=
false
;
if
(
nr_sequences
>
1
)
{
if
(
nr_sequences
>
1
)
{
if
(
xrtmag_dBtimes10
<
(
50
+
xrtmag_next_dBtimes10
)
||
SNRtimes10
<
uci_stats
->
pucch0_thres
)
if
(
xrtmag_dBtimes10
<
(
50
+
xrtmag_next_dBtimes10
)
||
SNRtimes10
<
gNB
->
pucch0_thres
)
{
no_conf
=
true
;
no_conf
=
true
;
LOG_W
(
PHY
,
"%d.%d PUCCH bad confidence: %d threshold, %d, %d, %d
\n
"
,
frame
,
slot
,
uci_stats
->
pucch0_thres
,
SNRtimes10
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
);
abort
();
}
}
}
gNB
->
bad_pucch
+=
no_conf
;
gNB
->
bad_pucch
+=
no_conf
;
// first bit of bitmap for sr presence and second bit for acknack presence
// first bit of bitmap for sr presence and second bit for acknack presence
...
@@ -422,7 +426,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -422,7 +426,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
if
(
pucch_pdu
->
bit_len_harq
==
0
)
{
if
(
pucch_pdu
->
bit_len_harq
==
0
)
{
uci_pdu
->
harq
=
NULL
;
uci_pdu
->
harq
=
NULL
;
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
->
sr_confidence_level
=
no_conf
?
1
:
0
;
uci_pdu
->
sr
->
sr_confidence_level
=
no_conf
;
uci_stats
->
pucch0_sr_trials
++
;
uci_stats
->
pucch0_sr_trials
++
;
if
(
xrtmag_dBtimes10
>
(
10
*
gNB
->
measurements
.
n0_power_tot_dB
))
{
if
(
xrtmag_dBtimes10
>
(
10
*
gNB
->
measurements
.
n0_power_tot_dB
))
{
uci_pdu
->
sr
->
sr_indication
=
1
;
uci_pdu
->
sr
->
sr_indication
=
1
;
...
@@ -434,17 +438,19 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -434,17 +438,19 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
else
if
(
pucch_pdu
->
bit_len_harq
==
1
)
{
else
if
(
pucch_pdu
->
bit_len_harq
==
1
)
{
uci_pdu
->
harq
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
harq
));
uci_pdu
->
harq
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
harq
));
uci_pdu
->
harq
->
num_harq
=
1
;
uci_pdu
->
harq
->
num_harq
=
1
;
uci_pdu
->
harq
->
harq_confidence_level
=
no_conf
?
1
:
0
;
uci_pdu
->
harq
->
harq_confidence_level
=
no_conf
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
1
);
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
sizeof
*
uci_pdu
->
harq
->
harq_list
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
(
index
&
0x01
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
(
index
&
0x01
);
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d (0 pass, 1 fail) with confidence level %d (0 is good, 1 is bad) xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d
\n
"
,
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ %s with confidence level %s xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d
\n
"
,
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
10
*
log10
((
double
)
sigenergy
),
gNB
->
ulsch_stats
[
0
].
sync_pos
);
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
==
0
?
"ACK"
:
"NACK"
,
uci_pdu
->
harq
->
harq_confidence_level
==
0
?
"good"
:
"bad"
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
10
*
log10
((
double
)
sigenergy
),
gNB
->
ulsch_stats
[
0
].
sync_pos
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
->
sr_indication
=
(
index
>
1
)
?
1
:
0
;
uci_pdu
->
sr
->
sr_indication
=
(
index
>
1
);
uci_pdu
->
sr
->
sr_confidence_level
=
no_conf
?
1
:
0
;
uci_pdu
->
sr
->
sr_confidence_level
=
no_conf
;
uci_stats
->
pucch0_positive_SR
++
;
uci_stats
->
pucch0_positive_SR
++
;
}
}
uci_stats
->
pucch01_trials
++
;
uci_stats
->
pucch01_trials
++
;
...
@@ -452,17 +458,23 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -452,17 +458,23 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
else
{
else
{
uci_pdu
->
harq
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
harq
));
uci_pdu
->
harq
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
harq
));
uci_pdu
->
harq
->
num_harq
=
2
;
uci_pdu
->
harq
->
num_harq
=
2
;
uci_pdu
->
harq
->
harq_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
harq
->
harq_confidence_level
=
no_conf
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
2
);
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
2
*
sizeof
(
*
uci_pdu
->
harq
->
harq_list
)
);
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
=
!
(
index
&
0x01
);
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
=
!
(
index
&
0x01
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
((
index
>>
1
)
&
0x01
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
((
index
>>
1
)
&
0x01
);
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d and %d (0 pass, 1 fail) with confidence level %d (0 is good, 1 is bad), xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d
\n
"
,
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ values (%s, %s) with confidence level %s, xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d
\n
"
,
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
gNB
->
ulsch_stats
[
0
].
sync_pos
);
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
==
0
?
"ACK"
:
"NACK"
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
==
0
?
"ACK"
:
"NACK"
,
uci_pdu
->
harq
->
harq_confidence_level
==
0
?
"good"
:
"bad"
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
gNB
->
ulsch_stats
[
0
].
sync_pos
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
->
sr_indication
=
(
index
>
3
)
?
1
:
0
;
uci_pdu
->
sr
->
sr_indication
=
(
index
>
3
)
?
1
:
0
;
uci_pdu
->
sr
->
sr_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
sr
->
sr_confidence_level
=
no_conf
;
}
}
}
}
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
ed1c87b5
...
@@ -817,6 +817,10 @@ void nr_pdcch_unscrambling(int16_t *z,
...
@@ -817,6 +817,10 @@ void nr_pdcch_unscrambling(int16_t *z,
if
(((
s
>>
(
i
%
32
))
&
1
)
==
1
)
z2
[
i
]
=
-
z
[
i
];
if
(((
s
>>
(
i
%
32
))
&
1
)
==
1
)
z2
[
i
]
=
-
z
[
i
];
else
z2
[
i
]
=
z
[
i
];
else
z2
[
i
]
=
z
[
i
];
}
}
printf
(
"Encoded Payload (length:%d dwords):
\n
"
,
length
>>
5
);
for
(
int
i
=
0
;
i
<
length
>>
5
;
i
++
)
printf
(
"[%d]->0x%08x
\t
"
,
i
,
z2
[
i
]);
}
}
...
@@ -868,6 +872,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
...
@@ -868,6 +872,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
int
L
=
rel15
->
L
[
j
];
int
L
=
rel15
->
L
[
j
];
// Loop over possible DCI lengths
// Loop over possible DCI lengths
for
(
int
k
=
0
;
k
<
rel15
->
num_dci_options
;
k
++
)
{
for
(
int
k
=
0
;
k
<
rel15
->
num_dci_options
;
k
++
)
{
// skip this candidate if we've already found one with the
// skip this candidate if we've already found one with the
// same rnti and format at a different aggregation level
// same rnti and format at a different aggregation level
...
@@ -902,8 +907,8 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
...
@@ -902,8 +907,8 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_length
,
L
);
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_length
,
L
);
n_rnti
=
rel15
->
rnti
;
n_rnti
=
rel15
->
rnti
;
LOG_D
(
PHY
,
"(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)
\n
"
,
LOG_D
(
PHY
,
"(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d
,payload %llx
)
\n
"
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
n_rnti
,
nr_dci_format_string
[
rel15
->
dci_format_options
[
k
]],
CCEind
,
dci_length
);
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
n_rnti
,
nr_dci_format_string
[
rel15
->
dci_format_options
[
k
]],
CCEind
,
dci_length
,
*
(
unsigned
long
long
*
)
dci_estimation
);
if
(
crc
==
n_rnti
)
{
if
(
crc
==
n_rnti
)
{
LOG_D
(
PHY
,
"(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)
\n
"
,
LOG_D
(
PHY
,
"(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)
\n
"
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
n_rnti
,
nr_dci_format_string
[
rel15
->
dci_format_options
[
k
]],
CCEind
,
dci_length
,
*
(
unsigned
long
long
*
)
dci_estimation
);
proc
->
frame_rx
,
proc
->
nr_slot_rx
,
n_rnti
,
nr_dci_format_string
[
rel15
->
dci_format_options
[
k
]],
CCEind
,
dci_length
,
*
(
unsigned
long
long
*
)
dci_estimation
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
ed1c87b5
...
@@ -172,6 +172,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
...
@@ -172,6 +172,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
memset
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
],
0
,
5
*
8448
);
memset
(
dlsch
->
harq_processes
[
i
]
->
d
[
r
],
0
,
5
*
8448
);
else
else
exit_flag
=
2
;
exit_flag
=
2
;
}
}
}
else
{
}
else
{
exit_flag
=
1
;
exit_flag
=
1
;
...
@@ -299,17 +300,14 @@ void nr_processDLSegment(void* arg) {
...
@@ -299,17 +300,14 @@ void nr_processDLSegment(void* arg) {
K_bits_F
=
Kr
-
harq_process
->
F
;
K_bits_F
=
Kr
-
harq_process
->
F
;
t_nrLDPC_time_stats
procTime
=
{
0
};
t_nrLDPC_time_stats
procTime
=
{
0
};
t_nrLDPC_time_stats
*
p_procTime
=
&
procTime
;
t_nrLDPC_procBuf
**
p_nrLDPC_procBuf
=
harq_process
->
p_nrLDPC_procBuf
;
t_nrLDPC_procBuf
**
p_nrLDPC_procBuf
=
harq_process
->
p_nrLDPC_procBuf
;
int16_t
w
[
5
*
8448
];
memset
(
w
,
0
,(
5
*
8448
)
*
sizeof
(
short
));
start_meas
(
&
rdata
->
ts_deinterleave
);
start_meas
(
&
rdata
->
ts_deinterleave
);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
int16_t
w
[
E
];
nr_deinterleaving_ldpc
(
E
,
nr_deinterleaving_ldpc
(
E
,
Qm
,
Qm
,
w
,
// [hna] w is e
w
,
// [hna] w is e
...
@@ -397,7 +395,7 @@ void nr_processDLSegment(void* arg) {
...
@@ -397,7 +395,7 @@ void nr_processDLSegment(void* arg) {
(
int8_t
*
)
&
pl
[
0
],
(
int8_t
*
)
&
pl
[
0
],
llrProcBuf
,
llrProcBuf
,
p_nrLDPC_procBuf
[
r
],
p_nrLDPC_procBuf
[
r
],
p_
procTime
);
&
procTime
);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_OUT);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_OUT);
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
...
...
openair1/PHY/TOOLS/dB_routines.h
deleted
100644 → 0
View file @
3be77c09
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*
* dB_routines.h
*
* Created on: Nov 12, 2013
* Author: winckel
*/
#ifndef DB_ROUTINES_H_
#define DB_ROUTINES_H_
int16_t
dB_fixed_times10
(
uint32_t
x
);
int16_t
dB_fixed_x10
(
uint32_t
x
);
#endif
/* DB_ROUTINES_H_ */
openair1/PHY/TOOLS/tools_defs.h
View file @
ed1c87b5
...
@@ -39,26 +39,30 @@ extern "C" {
...
@@ -39,26 +39,30 @@ extern "C" {
#define CEILIDIV(a,b) ((a+b-1)/b)
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
struct
complexd
{
typedef
struct
complexd
{
double
r
;
double
r
;
double
i
;
double
i
;
};
}
cd_t
;
struct
complexf
{
typedef
struct
complexf
{
float
r
;
float
r
;
float
i
;
float
i
;
};
}
cf_t
;
struct
complex16
{
typedef
struct
complex16
{
int16_t
r
;
int16_t
r
;
int16_t
i
;
int16_t
i
;
};
}
c16_t
;
struct
complex32
{
typedef
struct
complex32
{
int32_t
r
;
int32_t
r
;
int32_t
i
;
int32_t
i
;
};
}
c32_t
;
typedef
struct
complex64
{
int64_t
r
;
int64_t
i
;
}
c64_t
;
//cmult_sv.h
//cmult_sv.h
/*!\fn void multadd_real_vector_complex_scalar(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N)
/*!\fn void multadd_real_vector_complex_scalar(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N)
...
...
openair1/SCHED/sched_common_vars.h
View file @
ed1c87b5
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
*/
*/
#include <stdint.h>
#include <stdint.h>
#include <openair1/SCHED/sched_common_extern.h>
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
...
...
openair1/SCHED_NR_UE/harq_nr.c
View file @
ed1c87b5
...
@@ -339,55 +339,23 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, int
...
@@ -339,55 +339,23 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int ndi, int
dl_harq
->
first_rx
=
1
;
dl_harq
->
first_rx
=
1
;
}
}
else
{
else
{
switch
(
rv
){
LOG_D
(
PHY
,
"receive harq process: %p harqPid=%d, rv=%d, ndi=%d, rntiType=%d, DCIndi=%d
\n
"
,
case
0
:
dl_harq
,
harq_pid
,
rv
,
ndi
,
rnti_type
,
dl_harq
->
DCINdi
);
dl_harq
->
round
=
0
;
AssertFatal
(
rv
<
4
&&
rv
>=
0
,
"invalid redondancy version %d
\n
"
,
rv
);
dl_harq
->
status
=
ACTIVE
;
if
(
rv
!=
0
&&
dl_harq
->
ack
==
DL_NACK
)
dl_harq
->
first_rx
=
1
;
LOG_D
(
PHY
,
"New transmission on a harq pid (%d) never acknowledged
\n
"
,
harq_pid
);
if
(
dl_harq
->
DCINdi
==
ndi
)
if
(
rv
==
0
&&
ndi
==
dl_harq
->
DCINdi
)
LOG_E
(
PHY
,
"Warning! rv %d indicates new transmission but new ndi %d is the same as old ndi %d
\n
"
,
rv
,
ndi
,
dl_harq
->
DCINdi
);
LOG_D
(
PHY
,
"Missed previous DCI detections. redondancy version is new transmission, but ndi doesn't toogle
\n
"
);
dl_harq
->
DCINdi
=
ndi
;
dl_harq
->
first_rx
=
(
rv
==
0
);
break
;
const
int
rounds
[
4
]
=
{
0
,
3
,
1
,
2
};
case
1
:
dl_harq
->
round
=
rounds
[
rv
];
dl_harq
->
round
=
3
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
0
;
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
dl_harq
->
first_rx
=
1
;
dl_harq
->
DCINdi
=
ndi
;
}
else
if
(
dl_harq
->
ack
==
1
)
dl_harq
->
status
=
SCH_IDLE
;
break
;
case
2
:
dl_harq
->
round
=
1
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
0
;
if
(
rv
!=
0
&&
dl_harq
->
DCINdi
!=
ndi
)
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_E
(
PHY
,
"Missed previous DCI detections. redondancy version (%d) is retransmission, but ndi toogle
\n
"
,
rv
);
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
if
(
rv
!=
0
&&
dl_harq
->
ack
!=
DL_NACK
)
dl_harq
->
first_rx
=
1
;
LOG_E
(
PHY
,
"Missed previous DCI detections. redondancy version (%d) is retransmission, but status is not DL_NACK
\n
"
,
rv
)
;
dl_harq
->
DCINdi
=
ndi
;
dl_harq
->
DCINdi
=
ndi
;
//dl_harq->status = SCH_IDLE;
}
}
else
if
(
dl_harq
->
ack
==
1
)
dl_harq
->
status
=
SCH_IDLE
;
break
;
case
3
:
dl_harq
->
round
=
2
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
0
;
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
dl_harq
->
first_rx
=
1
;
dl_harq
->
DCINdi
=
ndi
;
}
else
if
(
dl_harq
->
ack
==
1
)
dl_harq
->
status
=
SCH_IDLE
;
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid value for rv %d
\n
"
,
rv
);
}
}
}
}
openair2/LAYER2/MAC/config.c
View file @
ed1c87b5
...
@@ -58,11 +58,6 @@ extern int l2_init_eNB(void);
...
@@ -58,11 +58,6 @@ extern int l2_init_eNB(void);
extern
void
mac_top_init_eNB
(
void
);
extern
void
mac_top_init_eNB
(
void
);
extern
void
mac_init_cell_params
(
int
Mod_idP
,
int
CC_idP
);
extern
void
mac_init_cell_params
(
int
Mod_idP
,
int
CC_idP
);
int32_t
**
rxdata
;
int32_t
**
txdata
;
typedef
struct
eutra_bandentry_s
{
typedef
struct
eutra_bandentry_s
{
int16_t
band
;
int16_t
band
;
uint32_t
ul_min
;
uint32_t
ul_min
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
ed1c87b5
...
@@ -2092,6 +2092,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
...
@@ -2092,6 +2092,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
pucch
->
is_common
=
current_harq
->
is_common
;
pucch
->
is_common
=
current_harq
->
is_common
;
current_harq
->
active
=
false
;
current_harq
->
active
=
false
;
current_harq
->
ack_received
=
false
;
current_harq
->
ack_received
=
false
;
LOG_D
(
PHY
,
"%d.%d Sent %d ack on harq pid %d
\n
"
,
frame
,
slot
,
current_harq
->
ack
,
dl_harq_pid
);
}
}
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
ed1c87b5
...
@@ -811,6 +811,7 @@ static void handle_dl_harq(module_id_t mod_id,
...
@@ -811,6 +811,7 @@ static void handle_dl_harq(module_id_t mod_id,
stats
->
dlsch_errors
++
;
stats
->
dlsch_errors
++
;
LOG_D
(
NR_MAC
,
"retransmission error for UE %d (total %"
PRIu64
")
\n
"
,
UE_id
,
stats
->
dlsch_errors
);
LOG_D
(
NR_MAC
,
"retransmission error for UE %d (total %"
PRIu64
")
\n
"
,
UE_id
,
stats
->
dlsch_errors
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"NACK for: pid %d, ue %x
\n
"
,
harq_pid
,
UE_id
);
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
retrans_dl_harq
,
harq_pid
);
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
retrans_dl_harq
,
harq_pid
);
harq
->
round
++
;
harq
->
round
++
;
}
}
...
@@ -1442,7 +1443,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -1442,7 +1443,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
DevAssert
(
harq
->
is_waiting
);
DevAssert
(
harq
->
is_waiting
);
const
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
const
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
LOG_D
(
NR_MAC
,
"
bit %d pid %d ack/nack %d
\n
"
,
harq_bit
,
pid
,
harq_value
);
LOG_D
(
NR_MAC
,
"
%d.%d bit %d pid %d ack/nack %d
\n
"
,
frame
,
slot
,
harq_bit
,
pid
,
harq_value
);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
0
&&
harq_confidence
==
0
);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
0
&&
harq_confidence
==
0
);
if
(
harq_confidence
==
1
)
UE_info
->
mac_stats
[
UE_id
].
pucch0_DTX
++
;
if
(
harq_confidence
==
1
)
UE_info
->
mac_stats
[
UE_id
].
pucch0_DTX
++
;
}
}
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
ed1c87b5
...
@@ -78,13 +78,13 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
...
@@ -78,13 +78,13 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
int
sd
=
socket
(
server_address
.
sin_family
,
SOCK_DGRAM
,
0
);
int
sd
=
socket
(
server_address
.
sin_family
,
SOCK_DGRAM
,
0
);
if
(
sd
<
0
)
if
(
sd
<
0
)
{
{
LOG_E
(
MAC
,
"Socket creation error standalone PNF
\n
"
);
LOG_E
(
NR_
MAC
,
"Socket creation error standalone PNF
\n
"
);
return
;
return
;
}
}
if
(
inet_pton
(
server_address
.
sin_family
,
stub_eth_params
.
remote_addr
,
&
server_address
.
sin_addr
)
<=
0
)
if
(
inet_pton
(
server_address
.
sin_family
,
stub_eth_params
.
remote_addr
,
&
server_address
.
sin_addr
)
<=
0
)
{
{
LOG_E
(
MAC
,
"Invalid standalone PNF Address
\n
"
);
LOG_E
(
NR_
MAC
,
"Invalid standalone PNF Address
\n
"
);
close
(
sd
);
close
(
sd
);
return
;
return
;
}
}
...
@@ -92,7 +92,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
...
@@ -92,7 +92,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
// Using connect to use send() instead of sendto()
// Using connect to use send() instead of sendto()
if
(
connect
(
sd
,
(
struct
sockaddr
*
)
&
server_address
,
addr_len
)
<
0
)
if
(
connect
(
sd
,
(
struct
sockaddr
*
)
&
server_address
,
addr_len
)
<
0
)
{
{
LOG_E
(
MAC
,
"Connection to standalone PNF failed: %s
\n
"
,
strerror
(
errno
));
LOG_E
(
NR_
MAC
,
"Connection to standalone PNF failed: %s
\n
"
,
strerror
(
errno
));
close
(
sd
);
close
(
sd
);
return
;
return
;
}
}
...
@@ -118,7 +118,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
...
@@ -118,7 +118,7 @@ void nrue_init_standalone_socket(int tx_port, int rx_port)
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
server_address
,
addr_len
)
<
0
)
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
server_address
,
addr_len
)
<
0
)
{
{
LOG_E
(
MAC
,
"Connection to standalone PNF failed: %s
\n
"
,
strerror
(
errno
));
LOG_E
(
NR_
MAC
,
"Connection to standalone PNF failed: %s
\n
"
,
strerror
(
errno
));
close
(
sd
);
close
(
sd
);
return
;
return
;
}
}
...
@@ -603,10 +603,6 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
...
@@ -603,10 +603,6 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
pdu_0_1
->
harq
->
num_harq
=
1
;
pdu_0_1
->
harq
->
num_harq
=
1
;
pdu_0_1
->
harq
->
harq_confidence_level
=
0
;
pdu_0_1
->
harq
->
harq_confidence_level
=
0
;
pdu_0_1
->
harq
->
harq_list
=
CALLOC
(
pdu_0_1
->
harq
->
num_harq
,
sizeof
(
*
pdu_0_1
->
harq
->
harq_list
));
pdu_0_1
->
harq
->
harq_list
=
CALLOC
(
pdu_0_1
->
harq
->
num_harq
,
sizeof
(
*
pdu_0_1
->
harq
->
harq_list
));
for
(
int
k
=
0
;
k
<
pdu_0_1
->
harq
->
num_harq
;
k
++
)
{
pdu_0_1
->
harq
->
harq_list
[
k
].
harq_value
=
0
;
}
}
}
}
}
LOG_I
(
NR_MAC
,
"We have dequeued the previously filled uci_ind and updated the snf/slot to %d/%d.
\n
"
,
LOG_I
(
NR_MAC
,
"We have dequeued the previously filled uci_ind and updated the snf/slot to %d/%d.
\n
"
,
...
@@ -986,7 +982,7 @@ void *nrue_standalone_pnf_task(void *context)
...
@@ -986,7 +982,7 @@ void *nrue_standalone_pnf_task(void *context)
if
(
sem_post
(
&
sfn_slot_semaphore
)
!=
0
)
if
(
sem_post
(
&
sfn_slot_semaphore
)
!=
0
)
{
{
LOG_E
(
MAC
,
"sem_post() error
\n
"
);
LOG_E
(
NR_
MAC
,
"sem_post() error
\n
"
);
abort
();
abort
();
}
}
}
}
...
@@ -1062,7 +1058,7 @@ void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nac
...
@@ -1062,7 +1058,7 @@ void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nac
}
}
else
{
else
{
//shouldn't get here
//shouldn't get here
LOG_E
(
MAC
,
"Trying to process acknack for an inactive harq process (%d)
\n
"
,
harq_pid
);
LOG_E
(
NR_
MAC
,
"Trying to process acknack for an inactive harq process (%d)
\n
"
,
harq_pid
);
}
}
}
}
...
@@ -1121,9 +1117,9 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
...
@@ -1121,9 +1117,9 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
}
else
{
}
else
{
// UL indication after reception of DCI or DL PDU
// UL indication after reception of DCI or DL PDU
if
(
dl_info
&&
dl_info
->
dci_ind
&&
dl_info
->
dci_ind
->
number_of_dcis
)
{
if
(
dl_info
&&
dl_info
->
dci_ind
&&
dl_info
->
dci_ind
->
number_of_dcis
)
{
LOG_D
(
MAC
,
"[L2][IF MODULE][DL INDICATION][DCI_IND]
\n
"
);
LOG_D
(
NR_
MAC
,
"[L2][IF MODULE][DL INDICATION][DCI_IND]
\n
"
);
for
(
int
i
=
0
;
i
<
dl_info
->
dci_ind
->
number_of_dcis
;
i
++
)
{
for
(
int
i
=
0
;
i
<
dl_info
->
dci_ind
->
number_of_dcis
;
i
++
)
{
LOG_D
(
MAC
,
">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d
\n
"
,
i
,
dl_info
->
dci_ind
->
number_of_dcis
);
LOG_D
(
NR_
MAC
,
">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d
\n
"
,
i
,
dl_info
->
dci_ind
->
number_of_dcis
);
nr_scheduled_response_t
scheduled_response
;
nr_scheduled_response_t
scheduled_response
;
int8_t
ret
=
handle_dci
(
dl_info
->
module_id
,
int8_t
ret
=
handle_dci
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
cc_id
,
...
@@ -1137,7 +1133,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
...
@@ -1137,7 +1133,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
/* The check below filters out UL_DCIs (format 7) which are being processed as DL_DCIs. */
/* The check below filters out UL_DCIs (format 7) which are being processed as DL_DCIs. */
if
(
dci_index
->
dci_format
==
7
&&
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
)
{
if
(
dci_index
->
dci_format
==
7
&&
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
)
{
LOG_D
(
NR_MAC
,
"We are filtering a UL_DCI to prevent it from being treated like a DL_DCI
\n
"
);
LOG_D
(
NR_MAC
,
"We are filtering a UL_DCI to prevent it from being treated like a DL_DCI
\n
"
);
break
;
continue
;
}
}
dci_pdu_rel15_t
*
def_dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
dci_index
->
dci_format
];
dci_pdu_rel15_t
*
def_dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
dci_index
->
dci_format
];
g_harq_pid
=
def_dci_pdu_rel15
->
harq_pid
;
g_harq_pid
=
def_dci_pdu_rel15
->
harq_pid
;
...
@@ -1160,7 +1156,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
...
@@ -1160,7 +1156,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
for
(
int
i
=
0
;
i
<
dl_info
->
rx_ind
->
number_pdus
;
++
i
)
{
for
(
int
i
=
0
;
i
<
dl_info
->
rx_ind
->
number_pdus
;
++
i
)
{
LOG_D
(
MAC
,
"In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs
\n
"
,
LOG_D
(
NR_
MAC
,
"In %s sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs
\n
"
,
__FUNCTION__
,
__FUNCTION__
,
dl_info
->
rx_ind
->
rx_indication_body
[
i
].
pdu_type
,
dl_info
->
rx_ind
->
rx_indication_body
[
i
].
pdu_type
,
dl_info
->
rx_ind
->
number_pdus
);
dl_info
->
rx_ind
->
number_pdus
);
...
...
targets/RT/USER/lte-ue.c
View file @
ed1c87b5
...
@@ -93,9 +93,6 @@ extern uint16_t sf_ahead;
...
@@ -93,9 +93,6 @@ extern uint16_t sf_ahead;
void
ue_stub_rx_handler
(
unsigned
int
,
char
*
);
void
ue_stub_rx_handler
(
unsigned
int
,
char
*
);
int32_t
**
rxdata
;
int32_t
**
txdata
;
int
timer_subframe
=
0
;
int
timer_subframe
=
0
;
int
timer_frame
=
0
;
int
timer_frame
=
0
;
SF_ticking
*
phy_stub_ticking
=
NULL
;
SF_ticking
*
phy_stub_ticking
=
NULL
;
...
@@ -2498,23 +2495,18 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
...
@@ -2498,23 +2495,18 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
AssertFatal
(
phy_vars_ue
[
CC_id
]
!=
0
,
""
);
AssertFatal
(
phy_vars_ue
[
CC_id
]
!=
0
,
""
);
frame_parms
=
&
(
phy_vars_ue
[
CC_id
]
->
frame_parms
);
frame_parms
=
&
(
phy_vars_ue
[
CC_id
]
->
frame_parms
);
// replace RX signal buffers with mmaped HW versions
// replace RX signal buffers with mmaped HW versions
rxdata
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
txdata
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
LOG_I
(
PHY
,
"Mapping UE CC_id %d, rx_ant %d, freq %lu on card %d, chain %d
\n
"
,
LOG_I
(
PHY
,
"Mapping UE CC_id %d, rx_ant %d, freq %lu on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
);
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
=
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
// what about the "-N_TA_offset" ? // N_TA offset for TDD
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
=
rxdata
[
i
];
// what about the "-N_TA_offset" ? // N_TA offset for TDD
}
}
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
LOG_I
(
PHY
,
"Mapping UE CC_id %d, tx_ant %d, freq %lu on card %d, chain %d
\n
"
,
LOG_I
(
PHY
,
"Mapping UE CC_id %d, tx_ant %d, freq %lu on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
txdata
[
i
]
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
txdata
[
i
]
);
txdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
phy_vars_ue
[
CC_id
]
->
common_vars
.
txdata
[
i
]
=
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
phy_vars_ue
[
CC_id
]
->
common_vars
.
txdata
[
i
]
=
txdata
[
i
];
}
}
// rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x]
// rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x]
...
...
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