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
448cae25
Commit
448cae25
authored
Apr 03, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "ENDC path switch S1-U: Bugfixes at gNB side"
This reverts commit
1462f0e6
.
parent
f9fc712a
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
31 additions
and
170 deletions
+31
-170
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+0
-14
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+0
-2
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+2
-37
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+1
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+0
-25
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+0
-4
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+0
-12
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+0
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+2
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
+0
-4
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+23
-64
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
448cae25
...
...
@@ -36,7 +36,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
)
{
printf
(
"nr_pusch_channel_estimation Ns %d p %d symbol %d
\n
"
,
Ns
,
p
,
symbol
);
int
pilot
[
3280
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
...
...
@@ -492,18 +491,5 @@ printf("nr_pusch_channel_estimation Ns %d p %d symbol %d\n", Ns, p, symbol);
fclose
(
debug_ch_est
);
#endif
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"ch_estimate.%d.%d.raw"
,
gNB
->
proc
.
frame_rx
,
symbol
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
&
ul_ch_estimates
[
0
][
symbol_offset
],
nb_rb_pusch
*
12
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"ch_estimate_time.%d.%d.raw"
,
gNB
->
proc
.
frame_rx
,
symbol
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
ul_ch_estimates_time
[
0
],
1536
*
4
,
1
,
f
);
fclose
(
f
);
}
return
(
0
);
}
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
448cae25
...
...
@@ -238,8 +238,6 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
],
0
,
NULL
);
polar_encoder_fast
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
],
encoder_output
,
n_RNTI
,
1
,
currentPtr
);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx %d bits aggreg %d
\n
"
,
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
])[
0
],
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
])[
1
],
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
#ifdef DEBUG_CHANNEL_CODING
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
448cae25
...
...
@@ -82,8 +82,6 @@ void nr_fill_prach(PHY_VARS_gNB *gNB,
void
init_prach_ru_list
(
RU_t
*
ru
)
{
//g_log->debug_mask |= PRACH;
AssertFatal
(
ru
!=
NULL
,
"ruis null
\n
"
);
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_RU_PRACH_MAX
;
i
++
)
ru
->
prach_list
[
i
].
frame
=-
1
;
pthread_mutex_init
(
&
ru
->
prach_list_mutex
,
NULL
);
...
...
@@ -384,17 +382,6 @@ void rx_nr_prach_ru(RU_t *ru,
for
(
int
i
=
6
;
i
<
12
;
i
++
)
dft1536
(
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
reps
+=
6
;
}
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"time.%d.%d.raw"
,
frame
,
slot
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
prach2
-
1536
*
4
,
1536
*
4
*
4
+
1536
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"freq.%d.%d.raw"
,
frame
,
slot
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF
[
aa
],
1536
*
4
*
4
,
1
,
f
);
fclose
(
f
);
}
}
// mu==1
else
if
(
mu
==
2
)
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
else
if
(
mu
==
3
)
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
...
...
@@ -528,13 +515,6 @@ if (0){
}
memcpy
((
void
*
)
rxsigF2
,(
void
*
)
rxsigF_tmp
,
N_ZC
<<
2
);
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"sum.%d.%d.raw"
,
frame
,
slot
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF_tmp
,
N_ZC
*
4
,
1
,
f
);
fclose
(
f
);
}
}
}
...
...
@@ -557,7 +537,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t
rootSequenceIndex
;
int
numrootSequenceIndex
;
uint8_t
restricted_set
;
uint8_t
n_ra_prb
=
0
;
uint8_t
n_ra_prb
;
int16_t
*
prachF
=
NULL
;
int
nb_rx
;
...
...
@@ -640,19 +620,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
*
max_preamble_delay
=
0
;
*
max_preamble
=
0
;
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"sum2.%d.%d.raw"
,
frame
,
subframe
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF
[
0
],
N_ZC
*
4
,
1
,
f
);
fclose
(
f
);
}
for
(
preamble_index
=
0
;
preamble_index
<
64
;
preamble_index
++
)
{
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],(
N_ZC
==
839
)
?
840
:
140
));
if
(
en
>
40
&&
preamble_index
==
0
)
LOG_I
(
PHY
,
"%d.%d: try preamble %d en %d
\n
"
,
frame
,
subframe
,
preamble_index
,
en
);
}
if
(
LOG_DEBUGFLAG
(
PRACH
)){
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],(
N_ZC
==
839
)
?
840
:
140
));
...
...
@@ -733,9 +701,8 @@ if (en>40 && preamble_index==0) LOG_I(PHY,"%d.%d: try preamble %d en %d\n",frame
}
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],
140
));
if
(
LOG_DEBUGFLAG
(
PRACH
))
{
//
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],
840
));
if
(
en
>
60
)
LOG_I
(
PHY
,
"frame %d, subframe %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)
\n
"
,
frame
,
subframe
,
preamble_index
,
NCS
,
N_ZC
/
NCS
,
preamble_offset
,
preamble_shift
,
en
);
}
...
...
@@ -798,8 +765,6 @@ if (en>40 && preamble_index==0) LOG_I(PHY,"%d.%d: try preamble %d en %d\n",frame
for
(
i
=
0
;
i
<
NCS2
;
i
++
)
{
lev
=
(
int32_t
)
prach_ifft
[(
preamble_shift2
+
i
)];
levdB
=
dB_fixed_times10
(
lev
);
//if (en>60) LOG_I(PHY, "preamble_index %d NCS2 %d i %d lev %d levdB %d preamble_shift2 %d\n", preamble_index, NCS2, i, lev, levdB, preamble_shift2);
if
(
levdB
>*
max_preamble_energy
)
{
*
max_preamble_energy
=
levdB
;
*
max_preamble_delay
=
i
;
// Note: This has to be normalized to the 30.72 Ms/s sampling rate
...
...
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
View file @
448cae25
...
...
@@ -94,6 +94,7 @@ void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map)
nr_du
[
u
]
=
((
p
<
(
N_ZC
>>
1
))
?
p
:
(
N_ZC
-
p
));
}
}
void
compute_nr_prach_seq
(
uint8_t
short_sequence
,
...
...
@@ -148,7 +149,6 @@ void compute_nr_prach_seq(uint8_t short_sequence,
for
(
k
=
0
;
k
<
N_ZC
;
k
++
)
{
// multiply by inverse of 2 (required since ru is exp[j 2\pi n])
X_u
[
i
][
k
]
=
((
uint32_t
*
)
nr_ru
)[(((
k
*
(
1
+
(
inv_u
*
k
)))
%
N_ZC
)
*
nr_ZC_inv
[
2
])
%
N_ZC
];
if
(
k
<
16
)
printf
(
"u %d k %d I %d Q %d index %d
\n
"
,
u
,
k
,
(
short
)(
X_u
[
i
][
k
]
&
65535
),
(
short
)((
X_u
[
i
][
k
]
>>
16
)
&
65535
),
(((
k
*
(
1
+
(
inv_u
*
k
)))
%
N_ZC
)
*
70
)
%
N_ZC
);
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
448cae25
...
...
@@ -87,6 +87,7 @@ void nr_ulsch_unscrambling(int16_t* llr,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
448cae25
...
...
@@ -1030,8 +1030,6 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
gNB
->
ulsch
[
UE_id
][
0
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
uint8_t
nodata_dmrs
=
1
;
// FIXME to be properly configured from fapi
printf
(
"nr_rx_pusch frame %d nr_tti_rx %d symbol %d rel15_ul->start_symbol_index %d rel15_ul->nr_of_symbols %d
\n
"
,
frame
,
nr_tti_rx
,
symbol
,
rel15_ul
->
start_symbol_index
,
rel15_ul
->
nr_of_symbols
);
dmrs_symbol_flag
=
0
;
ptrs_symbol_flag
=
0
;
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_sc_per_ofdm_symbol
=
0
;
...
...
@@ -1107,15 +1105,6 @@ printf("nr_rx_pusch frame %d nr_tti_rx %d symbol %d rel15_ul->start_symbol_index
//--------------------- RBs extraction ---------------------
//----------------------------------------------------------
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdataF.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
fwrite
(
&
gNB
->
common_vars
.
rxdataF
[
0
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
*
4
,
1
,
f
);
fclose
(
f
);
}
if
(
nb_re_pusch
>
0
)
{
nr_ulsch_extract_rbs_single
(
gNB
->
common_vars
.
rxdataF
,
...
...
@@ -1166,20 +1155,6 @@ printf("nr_rx_pusch frame %d nr_tti_rx %d symbol %d rel15_ul->start_symbol_index
rel15_ul
->
rb_size
,
gNB
->
pusch_vars
[
UE_id
]
->
log2_maxh
);
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdataF_ext.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
int
nb_re_pusch
=
NR_NB_SC_PER_RB
*
rel15_ul
->
rb_size
;
fwrite
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
][
symbol
*
nb_re_pusch
],
nb_re_pusch
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"rxdataF_comp.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
fwrite
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
][
symbol
*
nb_re_pusch
],
nb_re_pusch
*
4
,
1
,
f
);
fclose
(
f
);
}
#ifdef NR_SC_FDMA
nr_idft
(
&
((
uint32_t
*
)
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
])[
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
nb_re_pusch
);
#endif
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
448cae25
...
...
@@ -77,8 +77,6 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot,
}
}
//ru = gNB->RU_list[0];
//rx_nr_prach_ru(ru, prach_pdu, frame, slot);
rx_nr_prach
(
gNB
,
prach_pdu
,
...
...
@@ -88,8 +86,6 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot,
&
max_preamble_energy
[
0
],
&
max_preamble_delay
[
0
]
);
if
(
max_preamble_energy
[
0
]
>
200
)
printf
(
"ra %d.%d preamble %d energy %d delay %d gNB->measurements.prach_I0+100 %d
\n
"
,
frame
,
slot
,
max_preamble
[
0
],
max_preamble_energy
[
0
],
max_preamble_delay
[
0
],
gNB
->
measurements
.
prach_I0
+
100
);
LOG_D
(
PHY
,
"[RAPROC] Frame %d, slot %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)
\n
"
,
frame
,
slot
,
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
448cae25
...
...
@@ -512,16 +512,6 @@ void nr_fep0(RU_t *ru, int first_half) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
proc
->
tti_rx
,
1
);
if
(
0
){
//printf("nr_fep0 proc->tti_rx %d f %dd\n", proc->tti_rx, proc->frame_rx);
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdata.%d.%d.raw"
,
proc
->
frame_rx
,
proc
->
tti_rx
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
&
ru
->
common
.
rxdata
[
0
][
proc
->
tti_rx
*
23040
],
23040
*
4
,
1
,
f
);
fclose
(
f
);
}
// remove_7_5_kHz(ru,(slot&1)+(proc->tti_rx<<1));
for
(
l
=
start_symbol
;
l
<
end_symbol
;
l
++
)
{
for
(
aa
=
0
;
aa
<
fp
->
nb_antennas_rx
;
aa
++
)
{
...
...
@@ -660,8 +650,6 @@ void nr_fep_full(RU_t *ru, int slot) {
// remove_7_5_kHz(ru,proc->tti_rx<<1);
// remove_7_5_kHz(ru,1+(proc->tti_rx<<1));
printf
(
"nr_fep_full proc->tti_rx %d
\n
"
,
proc
->
tti_rx
);
for
(
l
=
0
;
l
<
fp
->
symbols_per_slot
;
l
++
)
{
for
(
aa
=
0
;
aa
<
fp
->
nb_antennas_rx
;
aa
++
)
{
nr_slot_fep_ul
(
fp
,
...
...
openair2/GNB_APP/gnb_config.c
View file @
448cae25
...
...
@@ -237,7 +237,6 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
|=
(((
ssbmap
>>
(
7
-
i
))
&
0x01
)
<<
i
);
//scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0x80; //ssbmap;
}
else
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
448cae25
...
...
@@ -1434,7 +1434,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu,
uint8_t
N_sh_symb
=
pdsch_rel15
->
NrOfSymbols
;
uint8_t
Imcs
=
pdsch_rel15
->
mcsIndex
[
0
];
uint16_t
N_RE_prime
=
NR_NB_SC_PER_RB
*
N_sh_symb
-
N_PRB_DMRS
-
N_PRB_oh
;
LOG_
I
(
MAC
,
"N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead
\n
"
,
N_RE_prime
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_oh
);
LOG_
D
(
MAC
,
"N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead
\n
"
,
N_RE_prime
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_oh
);
uint16_t
R
;
uint32_t
TBS
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
448cae25
...
...
@@ -295,7 +295,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
LOG_D
(
MAC
,
"%s() Msg2[%04d%d] SFN/SF:%04d%d
\n
"
,
__FUNCTION__
,
ra
->
Msg2_frame
,
ra
->
Msg2_slot
,
frameP
,
slotP
);
do
{
ra
->
rnti
=
666
;
//
(taus() % 65518) + 1;
ra
->
rnti
=
(
taus
()
%
65518
)
+
1
;
loop
++
;
}
while
(
loop
!=
100
&&
!
(
find_nr_UE_id
(
module_idP
,
ra
->
rnti
)
==
-
1
&&
ra
->
rnti
>=
1
&&
ra
->
rnti
<=
65519
));
...
...
@@ -679,7 +679,7 @@ void nr_generate_Msg2(module_id_t module_idP,
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
rnti_types
[
0
]
=
NR_RNTI_RA
;
LOG_
I
(
MAC
,
"[RAPROC] DCI params: rnti %d, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
LOG_
D
(
MAC
,
"[RAPROC] DCI params: rnti %d, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
pdcch_pdu_rel15
->
dci_pdu
.
RNTI
[
0
],
rnti_types
[
0
],
dci_formats
[
0
],
...
...
@@ -812,8 +812,6 @@ void nr_fill_rar(uint8_t Mod_idP,
ul_grant
=
csi_req
|
(
tpc_command
<<
1
)
|
(
pusch_pdu
->
mcs_index
<<
4
)
|
(
ra
->
Msg3_tda_id
<<
8
)
|
(
f_alloc
<<
12
)
|
(
pusch_pdu
->
frequency_hopping
<<
26
);
printf
(
"ul grant 0x%x mcs %d f_alloc %d tpc %d
\n
"
,
ul_grant
,
pusch_pdu
->
mcs_index
,
f_alloc
,
tpc_command
);
rar
->
UL_GRANT_1
=
(
uint8_t
)
(
ul_grant
>>
24
)
&
0x07
;
rar
->
UL_GRANT_2
=
(
uint8_t
)
(
ul_grant
>>
16
)
&
0xff
;
rar
->
UL_GRANT_3
=
(
uint8_t
)
(
ul_grant
>>
8
)
&
0xff
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
448cae25
...
...
@@ -82,7 +82,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP){
if
(
mib_sdu_length
>
0
)
{
LOG_
D
(
MAC
,
"Frame %d, slot %d: Adding BCH PDU in position %d (length %d)
\n
"
,
frameP
,
slotP
,
dl_req
->
nPDUs
,
mib_sdu_length
);
LOG_
I
(
MAC
,
"Frame %d, slot %d: Adding BCH PDU in position %d (length %d)
\n
"
,
frameP
,
slotP
,
dl_req
->
nPDUs
,
mib_sdu_length
);
if
((
frameP
&
1023
)
<
80
){
LOG_I
(
MAC
,
"[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
mib_sdu_length
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
View file @
448cae25
...
...
@@ -28,8 +28,6 @@
#include "common/utils/nr/nr_common.h"
#include <math.h>
#include "LOG/log.h"
//Table 5.1.2.2-2
uint16_t
Tbstable_nr
[
INDEX_MAX_TBS_TABLE
]
=
{
24
,
32
,
40
,
48
,
56
,
64
,
72
,
80
,
88
,
96
,
104
,
112
,
120
,
128
,
136
,
144
,
152
,
160
,
168
,
176
,
184
,
192
,
208
,
224
,
240
,
256
,
272
,
288
,
304
,
320
,
336
,
352
,
368
,
384
,
408
,
432
,
456
,
480
,
504
,
528
,
552
,
576
,
608
,
640
,
672
,
704
,
736
,
768
,
808
,
848
,
888
,
928
,
984
,
1032
,
1064
,
1128
,
1160
,
1192
,
1224
,
1256
,
1288
,
1320
,
1352
,
1416
,
1480
,
1544
,
1608
,
1672
,
1736
,
1800
,
1864
,
1928
,
2024
,
2088
,
2152
,
2216
,
2280
,
2408
,
2472
,
2536
,
2600
,
2664
,
2728
,
2792
,
2856
,
2976
,
3104
,
3240
,
3368
,
3496
,
3624
,
3752
,
3824
};
...
...
@@ -90,8 +88,6 @@ uint32_t nr_compute_tbs(uint16_t Qm,
}
//printf("Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d\n", Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
LOG_I
(
PHY
,
"Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d nb_symb_sch %d nb_dmrs_prb %d nb_rb_oh %d tb_scaling %d Nl %d
\n
"
,
Ninfo
,
nbp_re
,
nb_re
,
Qm
,
R
,
nr_tbs
,
nb_symb_sch
,
nb_dmrs_prb
,
nb_rb_oh
,
tb_scaling
,
Nl
);
return
nr_tbs
;
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
448cae25
...
...
@@ -116,7 +116,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
tag
->
tag_Id
=
0
;
tag
->
timeAlignmentTimer
=
NR_TimeAlignmentTimer_infinity
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
mac_CellGroupConfig
->
tag_Config
->
tag_ToAddModList
->
list
,
tag
);
#if 1
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
));
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
present
=
NR_SetupRelease_PHR_Config_PR_setup
;
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
));
...
...
@@ -127,7 +126,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
dummy
=
false
;
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_Type2OtherCell
=
false
;
secondaryCellGroup
->
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_ModeOtherCG
=
NR_PHR_Config__phr_ModeOtherCG_real
;
#endif
secondaryCellGroup
->
mac_CellGroupConfig
->
skipUplinkTxDynamic
=
false
;
secondaryCellGroup
->
mac_CellGroupConfig
->
ext1
=
NULL
;
...
...
@@ -152,7 +150,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
*
secondaryCellGroup
->
spCellConfig
->
servCellIndex
=
servCellIndex
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
));
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
spCellConfigCommon
=
servingcellconfigcommon
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
=
(
get_softmodem_params
()
->
phy_test
==
1
)
?
0x1234
:
0x3456
;
//
(taus()&0xffff);
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
=
(
get_softmodem_params
()
->
phy_test
==
1
)
?
0x1234
:
(
taus
()
&
0xffff
);
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
t304
=
NR_ReconfigurationWithSync__t304_ms2000
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
ext1
=
NULL
;
...
...
@@ -211,11 +209,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
NULL
;
#if 0
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
NR_TCI_State_t
*
tci0
=
calloc
(
1
,
sizeof
(
*
tci0
));
...
...
@@ -377,7 +371,6 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
tci15
->
qcl_Type1
.
referenceSignal
.
choice
.
ssb
=
7
;
tci15
->
qcl_Type1
.
qcl_Type
=
NR_QCL_Info__qcl_Type_typeC
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
,
tci15
);
#endif
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToReleaseList
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
vrb_ToPRB_Interleaver
=
NULL
;
...
...
@@ -406,8 +399,6 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
p_ZP_CSI_RS_ResourceSet
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
sps_Config
=
NULL
;
//calloc(1,sizeof(struct NR_SetupRelease_SPS_Config));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
=
NULL
;
#if 0
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
present
=
NR_SetupRelease_RadioLinkMonitoringConfig_PR_setup
;
...
...
@@ -418,10 +409,8 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureInstanceMaxCount
=
NR_RadioLinkMonitoringConfig__beamFailureInstanceMaxCount_n3
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
=
NR_RadioLinkMonitoringConfig__beamFailureDetectionTimer_pbfd2
;
#endif
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToReleaseList
=
NULL
;
// secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList = NULL;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
));
NR_BWP_Downlink_t
*
bwp
=
calloc
(
1
,
sizeof
(
*
bwp
));
...
...
@@ -431,7 +420,6 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
memcpy
((
void
*
)
&
bwp
->
bwp_Common
->
genericParameters
,
&
servingcellconfigcommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
,
sizeof
(
bwp
->
bwp_Common
->
genericParameters
));
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
6407
;
//PRBalloc_to_locationandbandwidth(servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,0);
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
...
...
@@ -485,7 +473,7 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
ss
->
monitoringSymbolsWithinSlot
->
buf
=
calloc
(
1
,
2
);
// should be '1100 0000 0000 00'B (LSB first!), first two symols in slot, adjust if needed
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
=
0
;
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
(
1
<<
7
)
;
//
| (1<<6);
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
(
1
<<
7
)
|
(
1
<<
6
);
ss
->
monitoringSymbolsWithinSlot
->
size
=
2
;
ss
->
monitoringSymbolsWithinSlot
->
bits_unused
=
2
;
ss
->
nrofCandidates
=
calloc
(
1
,
sizeof
(
*
ss
->
nrofCandidates
));
...
...
@@ -508,7 +496,6 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
));
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
=
1
;
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ext1
=
NULL
;
//bwp->bwp_Common->pdcch_ConfigCommon=NULL;
bwp
->
bwp_Common
->
pdsch_ConfigCommon
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
->
pdsch_ConfigCommon
));
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
present
=
NR_SetupRelease_PDSCH_ConfigCommon_PR_setup
;
...
...
@@ -554,7 +541,7 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
ss2
->
monitoringSymbolsWithinSlot
->
buf
=
calloc
(
1
,
2
);
ss2
->
monitoringSymbolsWithinSlot
->
size
=
2
;
ss2
->
monitoringSymbolsWithinSlot
->
bits_unused
=
2
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x
80
;
//0x
c0;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0xc0
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
=
0x0
;
ss2
->
nrofCandidates
=
calloc
(
1
,
sizeof
(
*
ss2
->
nrofCandidates
));
ss2
->
nrofCandidates
->
aggregationLevel1
=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
;
...
...
@@ -590,10 +577,7 @@ secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pds
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
NULL
;
#if 0
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
NR_TCI_State_t
*
tcid0
=
calloc
(
1
,
sizeof
(
*
tcid0
));
...
...
@@ -755,7 +739,6 @@ bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTyp
tcid15
->
qcl_Type1
.
referenceSignal
.
choice
.
ssb
=
7
;
tcid15
->
qcl_Type1
.
qcl_Type
=
NR_QCL_Info__qcl_Type_typeC
;
ASN_SEQUENCE_ADD
(
&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
,
tcid15
);
#endif
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
vrb_ToPRB_Interleaver
=
NULL
;
...
...
@@ -810,8 +793,6 @@ bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTyp
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
p_ZP_CSI_RS_ResourceSet
=
NULL
;
bwp
->
bwp_Dedicated
->
sps_Config
=
NULL
;
//calloc(1,sizeof(struct NR_SetupRelease_SPS_Config));
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
=
NULL
;
#if 0
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
));
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
present
=
NR_SetupRelease_RadioLinkMonitoringConfig_PR_setup
;
...
...
@@ -822,17 +803,14 @@ bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTyp
*
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureInstanceMaxCount
=
NR_RadioLinkMonitoringConfig__beamFailureInstanceMaxCount_n3
;
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
));
*
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
choice
.
setup
->
beamFailureDetectionTimer
=
NR_RadioLinkMonitoringConfig__beamFailureDetectionTimer_pbfd2
;
#endif
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
,
bwp
);
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
=
1
;
//0; //1;
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
=
1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
bwp_InactivityTimer
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
defaultDownlinkBWP_Id
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
defaultDownlinkBWP_Id
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
defaultDownlinkBWP_Id
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
defaultDownlinkBWP_Id
=
1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
));
NR_BWP_UplinkDedicated_t
*
initialUplinkBWP
=
calloc
(
1
,
sizeof
(
*
initialUplinkBWP
));
...
...
@@ -955,7 +933,6 @@ bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTyp
ASN_SEQUENCE_ADD
(
&
srs_Config
->
srs_ResourceToAddModList
->
list
,
srs_res0
);
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToReleaseList
=
NULL
;
// secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList = NULL;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
));
NR_BWP_Uplink_t
*
ubwp
=
calloc
(
1
,
sizeof
(
*
ubwp
));
ubwp
->
bwp_Id
=
1
;
...
...
@@ -964,10 +941,8 @@ bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTyp
memcpy
((
void
*
)
&
ubwp
->
bwp_Common
->
genericParameters
,
(
void
*
)
&
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
,
sizeof
(
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
));
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
6407
;
//PRBalloc_to_locationandbandwidth(servingcellconfigcommon->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,0);
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
=
PRBalloc_to_locationandbandwidth
(
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
0
);
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
restrictedSetConfig
=
0
;
ubwp
->
bwp_Common
->
rach_ConfigCommon
=
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
;
ubwp
->
bwp_Common
->
pusch_ConfigCommon
=
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
;
ubwp
->
bwp_Common
->
pucch_ConfigCommon
=
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
;
...
...
@@ -1122,7 +1097,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
,
ubwp
);
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
=
1
;
//0; //1;
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
=
1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
pusch_ServingCellConfig
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
carrierSwitching
=
NULL
;
...
...
@@ -1130,14 +1105,10 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdcch_ServingCellConfig
=
NULL
;
#if 0
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdsch_ServingCellConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdsch_ServingCellConfig
));
NR_PDSCH_ServingCellConfig_t
*
pdsch_servingcellconfig
=
calloc
(
1
,
sizeof
(
*
pdsch_servingcellconfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdsch_ServingCellConfig
->
present
=
NR_SetupRelease_PDSCH_ServingCellConfig_PR_setup
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdsch_ServingCellConfig
->
choice
.
setup
=
pdsch_servingcellconfig
;
#endif
NR_PDSCH_ServingCellConfig_t
*
pdsch_servingcellconfig
=
calloc
(
1
,
sizeof
(
*
pdsch_servingcellconfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
pdsch_ServingCellConfig
=
NULL
;
pdsch_servingcellconfig
->
codeBlockGroupTransmission
=
NULL
;
pdsch_servingcellconfig
->
xOverhead
=
NULL
;
pdsch_servingcellconfig
->
nrofHARQ_ProcessesForPDSCH
=
NULL
;
...
...
@@ -1147,13 +1118,12 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
*
pdsch_servingcellconfig
->
ext1
->
maxMIMO_Layers
=
2
;
pdsch_servingcellconfig
->
ext1
->
processingType2Enabled
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
=
NULL
;
//secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig));
//secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->present = NR_SetupRelease_CSI_MeasConfig_PR_setup;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
present
=
NR_SetupRelease_CSI_MeasConfig_PR_setup
;
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
));
//
secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup = csi_MeasConfig;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
=
csi_MeasConfig
;
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
));
NR_NZP_CSI_RS_Resource_t
*
nzpres0
=
calloc
(
1
,
sizeof
(
*
nzpres0
));
...
...
@@ -1693,7 +1663,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
symbolLocation_p1
=
7
;
imres0
->
freqBand
=
calloc
(
1
,
sizeof
(
*
imres0
->
freqBand
));
imres0
->
freqBand
->
startingRB
=
0
;
imres0
->
freqBand
->
nrofRBs
=
10
6
;
imres0
->
freqBand
->
nrofRBs
=
27
6
;
imres0
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
imres0
->
periodicityAndOffset
));
imres0
->
periodicityAndOffset
->
present
=
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
;
imres0
->
periodicityAndOffset
->
choice
.
slots320
=
2
;
...
...
@@ -1767,7 +1737,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires11
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
->
list
,
csires110
);
csires11
->
bwp_Id
=
1
;
csires11
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires11);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires11
);
NR_CSI_ResourceConfig_t
*
csires10
=
calloc
(
1
,
sizeof
(
*
csires10
));
csires10
->
csi_ResourceConfigId
=
10
;
...
...
@@ -1780,7 +1750,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires10
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires100
);
csires10
->
bwp_Id
=
1
;
csires10
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires10);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires10
);
NR_CSI_ResourceConfig_t
*
csires2
=
calloc
(
1
,
sizeof
(
*
csires2
));
csires2
->
csi_ResourceConfigId
=
2
;
...
...
@@ -1793,7 +1763,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires2
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires20
);
csires2
->
bwp_Id
=
1
;
csires2
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires2);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires2
);
NR_CSI_ResourceConfig_t
*
csires3
=
calloc
(
1
,
sizeof
(
*
csires3
));
csires3
->
csi_ResourceConfigId
=
3
;
...
...
@@ -1806,7 +1776,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires3
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires30
);
csires3
->
bwp_Id
=
1
;
csires3
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires3);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires3
);
NR_CSI_ResourceConfig_t
*
csires4
=
calloc
(
1
,
sizeof
(
*
csires4
));
csires4
->
csi_ResourceConfigId
=
4
;
...
...
@@ -1819,7 +1789,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires4
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires40
);
csires4
->
bwp_Id
=
1
;
csires4
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires4);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires4
);
NR_CSI_ResourceConfig_t
*
csires5
=
calloc
(
1
,
sizeof
(
*
csires5
));
csires5
->
csi_ResourceConfigId
=
5
;
...
...
@@ -1832,7 +1802,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires5
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires50
);
csires5
->
bwp_Id
=
1
;
csires5
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires5);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires5
);
NR_CSI_ResourceConfig_t
*
csires6
=
calloc
(
1
,
sizeof
(
*
csires6
));
csires6
->
csi_ResourceConfigId
=
6
;
...
...
@@ -1845,7 +1815,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires6
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires60
);
csires6
->
bwp_Id
=
1
;
csires6
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires6);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires6
);
NR_CSI_ResourceConfig_t
*
csires7
=
calloc
(
1
,
sizeof
(
*
csires7
));
csires7
->
csi_ResourceConfigId
=
7
;
...
...
@@ -1858,7 +1828,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires7
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires70
);
csires7
->
bwp_Id
=
1
;
csires7
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires7);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires7
);
NR_CSI_ResourceConfig_t
*
csires8
=
calloc
(
1
,
sizeof
(
*
csires8
));
csires8
->
csi_ResourceConfigId
=
8
;
...
...
@@ -1871,7 +1841,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires8
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires80
);
csires8
->
bwp_Id
=
1
;
csires8
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires8);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires8
);
NR_CSI_ResourceConfig_t
*
csires9
=
calloc
(
1
,
sizeof
(
*
csires9
));
csires9
->
csi_ResourceConfigId
=
9
;
...
...
@@ -1884,7 +1854,7 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
ASN_SEQUENCE_ADD
(
&
csires9
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires90
);
csires9
->
bwp_Id
=
1
;
csires9
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
//
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires9);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires9
);
csi_MeasConfig
->
csi_ReportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ReportConfigToAddModList
));
csi_MeasConfig
->
csi_ReportConfigToReleaseList
=
NULL
;
...
...
@@ -1912,9 +1882,8 @@ servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon
csirep0
->
reportFreqConfiguration
->
csi_ReportingBand
=
calloc
(
1
,
sizeof
(
*
csirep0
->
reportFreqConfiguration
->
csi_ReportingBand
));
//
AssertFatal(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id>0,"firstActiveDownlinkBWP_Id %d\n",(int)*secondaryCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id);
AssertFatal
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
>
0
,
"firstActiveDownlinkBWP_Id %d
\n
"
,(
int
)
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
);
int
NPRB
=
NRRIV2BW
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
firstActiveDownlinkBWP_Id
-
1
]
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
//int NPRB = NRRIV2BW(28875,275);
int
sbsize
=
get_subband_size
(
NPRB
,
0
);
int
numsb
=
NPRB
/
sbsize
;
if
(
NPRB
%
sbsize
==
0
)
numsb
++
;
...
...
@@ -2043,22 +2012,12 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
// radioBearerConfig
reconfig
->
radioBearerConfig
=
NULL
;
// secondaryCellGroup
#if 0
NR_ServingCellConfigCommon_t z = *servingcellconfigcommon;
NR_ARFCN_ValueNR_t ssb_freq = 641272; //642208; //642208 is for SSB position = ptA + 82 RBs with ptA at 3600MHz //642256; //642016; //642256;
z.downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = &ssb_freq;
fill_default_secondaryCellGroup(&z,secondaryCellGroup,1,1,n_physical_antenna_ports,initial_csi_index);
#else
fill_default_secondaryCellGroup
(
servingcellconfigcommon
,
secondaryCellGroup
,
1
,
1
,
n_physical_antenna_ports
,
initial_csi_index
);
#endif
fill_default_secondaryCellGroup
(
servingcellconfigcommon
,
secondaryCellGroup
,
0
,
0
,
n_physical_antenna_ports
,
initial_csi_index
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
(
const
void
*
)
secondaryCellGroup
);
//void *x = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon->tdd_UL_DL_ConfigurationCommon;
//secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon->tdd_UL_DL_ConfigurationCommon = NULL;
char
scg_buffer
[
1024
];
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
(
void
*
)
secondaryCellGroup
,
scg_buffer
,
1024
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
//secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon->tdd_UL_DL_ConfigurationCommon = x;
reconfig
->
secondaryCellGroup
=
calloc
(
1
,
sizeof
(
*
reconfig
->
secondaryCellGroup
));
...
...
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