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
alex037yang
OpenXG-RAN
Commits
c7dd406b
Commit
c7dd406b
authored
Jan 29, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first try to make UE slot based. WIP
parent
70e7e661
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
808 additions
and
2390 deletions
+808
-2390
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+2
-2
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+0
-4
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+10
-10
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+9
-9
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+51
-51
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+101
-111
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+12
-12
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+3
-5
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
+5
-5
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+5
-5
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-8
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+3
-3
openair1/SCHED_NR_UE/phy_frame_config_nr.c
openair1/SCHED_NR_UE/phy_frame_config_nr.c
+6
-6
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+545
-2100
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
+2
-2
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+33
-33
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+20
-18
targets/RT/USER/nr-uesoftmodem.c
targets/RT/USER/nr-uesoftmodem.c
+0
-5
No files found.
cmake_targets/autotests/test_case_list.xml
View file @
c7dd406b
...
...
@@ -1057,8 +1057,8 @@
(Test2: PBCH and synchronization, 106PBR),
(Test3: PBCH-only, 217 PRB),
(Test4: PBCH and synchronization, 217 RPB),
(Test5: PBCH-only, 2
17
PRB),
(Test6: PBCH and synchronization, 2
17
PRB)
</desc>
(Test5: PBCH-only, 2
73
PRB),
(Test6: PBCH and synchronization, 2
73
PRB)
</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>
$OPENAIR_DIR/cmake_targets/build_oai
</compile_prog>
<compile_prog_args>
--phy_simulators -c
</compile_prog_args>
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
c7dd406b
...
...
@@ -1020,10 +1020,6 @@ void set_default_frame_parms_single(nfapi_nr_config_request_t *config, NR_DL_FRA
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
// NR: Init to legacy LTE 20Mhz params
frame_parms
->
numerology_index
=
0
;
frame_parms
->
ttis_per_subframe
=
1
;
frame_parms
->
slots_per_tti
=
2
;
//}
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
c7dd406b
...
...
@@ -46,7 +46,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
NR_UE_COMMON
*
common_vars
=
&
ue
->
common_vars
;
uint8_t
eNB_id
=
0
;
//ue_common_vars->eNb_id;
unsigned
char
aa
;
unsigned
char
symbol
=
l
;
//+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
unsigned
char
symbol
=
l
;
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
//unsigned int subframe_offset;//,subframe_offset_F;
...
...
@@ -104,9 +104,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
}
if
(
no_prefix
)
{
slot_offset
=
frame_parms
->
ofdm_symbol_size
*
(
frame_parms
->
symbols_per_slot
*
frame_parms
->
slots_per_subframe
)
*
(
Ns
>>
1
);
slot_offset
=
frame_parms
->
ofdm_symbol_size
*
(
frame_parms
->
symbols_per_slot
)
*
(
Ns
);
}
else
{
slot_offset
=
(
frame_parms
->
samples_per_s
ubframe
)
*
(
Ns
>>
1
);
slot_offset
=
(
frame_parms
->
samples_per_s
lot
)
*
(
Ns
);
}
/*if (l<0 || l>=7-frame_parms->Ncp) {
...
...
@@ -122,7 +122,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
rx_offset
=
sample_offset
+
slot_offset
+
nb_prefix_samples0
-
SOFFSET
;
// Align with 256 bit
...
...
@@ -130,7 +130,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_FEP
// if (ue->frame <100)
/*LOG_I(PHY,*/
printf
(
"slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d
\n
"
,
ue
->
proc
.
proc_rxtx
[
(
Ns
>>
1
)
&
1
].
frame_rx
,
Ns
,
symbol
,
/*LOG_I(PHY,*/
printf
(
"slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d
\n
"
,
ue
->
proc
.
proc_rxtx
[
Ns
%
RX_NB_TH
].
frame_rx
,
Ns
,
symbol
,
nb_prefix_samples
,
nb_prefix_samples0
,
slot_offset
,
subframe_offset
,
sample_offset
,
rx_offset
,
frame_length_samples
);
#endif
...
...
@@ -146,14 +146,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
#endif
...
...
@@ -175,11 +175,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
...
...
@@ -190,7 +190,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_FEP
// if (ue->frame <100)
printf
(
"slot_fep: frame %d: symbol %d rx_offset %d
\n
"
,
ue
->
proc
.
proc_rxtx
[(
Ns
)
&
1
].
frame_rx
,
symbol
,
rx_offset
);
printf
(
"slot_fep: frame %d: symbol %d rx_offset %d
\n
"
,
ue
->
proc
.
proc_rxtx
[(
Ns
)
&
RX_NB_TH
].
frame_rx
,
symbol
,
rx_offset
);
#endif
}
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
c7dd406b
...
...
@@ -271,8 +271,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t
nushift
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
;
nushift
=
1
;
ue
->
frame_parms
.
nushift
=
nushift
;
...
...
@@ -287,7 +287,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
k
=
coreset_start_subcarrier
;
#ifdef DEBUG_PDCCH
printf
(
"PDCCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d
\n
"
,
ue
->
current_thread_id
[
Ns
>>
1
],
eNB_offset
,
ch_offset
,
ue
->
frame_parms
.
ofdm_symbol_size
,
printf
(
"PDCCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d
\n
"
,
ue
->
current_thread_id
[
Ns
],
eNB_offset
,
ch_offset
,
ue
->
frame_parms
.
ofdm_symbol_size
,
ue
->
frame_parms
.
Ncp
,
l
,
Ns
,
k
,
symbol
);
#endif
...
...
@@ -464,11 +464,11 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
// do ifft of channel estimate
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
{
LOG_D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
>>
1
],
l
);
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
0
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
LOG_D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
l
);
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
0
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
}
}
}
...
...
@@ -496,8 +496,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t
nushift
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
;
nushift
=
(
p
>>
1
)
&
1
;
ue
->
frame_parms
.
nushift
=
nushift
;
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
View file @
c7dd406b
...
...
@@ -1153,7 +1153,7 @@ uint8_t nr_subframe2harq_pid(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8
*/
uint8_t
ret
=
255
;
uint8_t
subframe
=
nr_tti_rx
>>
((
int
)(
log2
(
frame_parms
->
tti
s_per_subframe
)));
uint8_t
subframe
=
nr_tti_rx
>>
((
int
)(
log2
(
frame_parms
->
slot
s_per_subframe
)));
if
(
frame_parms
->
frame_type
==
FDD
)
{
ret
=
(((
frame
<<
1
)
+
nr_tti_rx
)
&
7
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
c7dd406b
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
c7dd406b
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
c7dd406b
...
...
@@ -604,7 +604,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
uint16_t
first_nonzero_root_idx
=
0
;
#if defined(EXMIMO) || defined(OAI_USRP)
prach_start
=
(
ue
->
rx_offset
+
subframe
*
ue
->
frame_parms
.
samples_per_
tti
-
ue
->
hw_timing_advance
-
ue
->
N_TA_offset
);
prach_start
=
(
ue
->
rx_offset
+
subframe
*
ue
->
frame_parms
.
samples_per_
subframe
-
ue
->
hw_timing_advance
-
ue
->
N_TA_offset
);
#ifdef PRACH_DEBUG
LOG_I
(
PHY
,
"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d
\n
"
,
ue
->
Mod_id
,
prach_start
,
...
...
@@ -614,13 +614,13 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
#endif
if
(
prach_start
<
0
)
prach_start
+=
(
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
prach_start
+=
(
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
if
(
prach_start
>=
(
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
prach_start
-=
(
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
if
(
prach_start
>=
(
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
prach_start
-=
(
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
#else //normal case (simulation)
prach_start
=
subframe
*
ue
->
frame_parms
.
samples_per_
tti
-
ue
->
N_TA_offset
;
prach_start
=
subframe
*
ue
->
frame_parms
.
samples_per_
subframe
-
ue
->
N_TA_offset
;
LOG_I
(
PHY
,
"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d
\n
"
,
ue
->
Mod_id
,
prach_start
,
ue
->
rx_offset
,
...
...
@@ -1160,10 +1160,10 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
// "prach_fmt4 not fully implemented" );
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
int
j
;
int
overflow
=
prach_start
+
prach_len
-
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
ue
->
frame_parms
.
samples_per_
tti
;
int
overflow
=
prach_start
+
prach_len
-
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
ue
->
frame_parms
.
samples_per_
subframe
;
LOG_I
(
PHY
,
"prach_start=%d, overflow=%d
\n
"
,
prach_start
,
overflow
);
for
(
i
=
prach_start
,
j
=
0
;
i
<
min
(
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
prach_start
+
prach_len
);
i
++
,
j
++
)
{
for
(
i
=
prach_start
,
j
=
0
;
i
<
min
(
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
prach_start
+
prach_len
);
i
++
,
j
++
)
{
((
int16_t
*
)
ue
->
common_vars
.
txdata
[
0
])[
2
*
i
]
=
prach
[
2
*
j
];
((
int16_t
*
)
ue
->
common_vars
.
txdata
[
0
])[
2
*
i
+
1
]
=
prach
[
2
*
j
+
1
];
}
...
...
@@ -1174,11 +1174,11 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
}
#if defined(EXMIMO)
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for
(
k
=
prach_start
-
(
ue
->
frame_parms
.
samples_per_
tti
>>
1
)
;
k
<
prach_start
;
k
++
)
{
for
(
k
=
prach_start
-
(
ue
->
frame_parms
.
samples_per_
subframe
>>
1
)
;
k
<
prach_start
;
k
++
)
{
if
(
k
<
0
)
ue
->
common_vars
.
txdata
[
0
][
k
+
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
if
(
k
>
(
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
ue
->
common_vars
.
txdata
[
0
][
k
-
ue
->
frame_parms
.
samples_per_
tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
ue
->
common_vars
.
txdata
[
0
][
k
+
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
if
(
k
>
(
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
ue
->
common_vars
.
txdata
[
0
][
k
-
ue
->
frame_parms
.
samples_per_
subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
]
&=
0xFFFEFFFE
;
else
ue
->
common_vars
.
txdata
[
0
][
k
]
&=
0xFFFEFFFE
;
}
...
...
@@ -1197,7 +1197,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
#if defined(PRACH_WRITE_OUTPUT_DEBUG)
LOG_M
(
"prach_txF0.m"
,
"prachtxF0"
,
prachF
,
prach_len
-
Ncp
,
1
,
1
);
LOG_M
(
"prach_tx0.m"
,
"prachtx0"
,
prach
+
(
Ncp
<<
1
),
prach_len
-
Ncp
,
1
,
1
);
LOG_M
(
"txsig.m"
,
"txs"
,(
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
0
]),
2
*
ue
->
frame_parms
.
samples_per_
tti
,
1
,
1
);
LOG_M
(
"txsig.m"
,
"txs"
,(
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
0
]),
2
*
ue
->
frame_parms
.
samples_per_
subframe
,
1
,
1
);
exit
(
-
1
);
#endif
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
c7dd406b
...
...
@@ -552,7 +552,7 @@ void set_frame_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue, int rate_change
{
/* set new value according to rate_change */
frame_parms_ue
->
ofdm_symbol_size
=
(
frame_parms_ue
->
ofdm_symbol_size
/
rate_change
);
frame_parms_ue
->
samples_per_
tti
=
(
frame_parms_ue
->
samples_per_tti
/
rate_change
);
frame_parms_ue
->
samples_per_
slot
=
(
frame_parms_ue
->
samples_per_slot
/
rate_change
);
frame_parms_ue
->
samples_per_subframe
=
(
frame_parms_ue
->
samples_per_subframe
/
rate_change
);
free_context_pss_nr
();
...
...
@@ -580,7 +580,7 @@ void set_frame_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue, int rate_change
void
restore_frame_context_pss_nr
(
NR_DL_FRAME_PARMS
*
frame_parms_ue
,
int
rate_change
)
{
frame_parms_ue
->
ofdm_symbol_size
=
frame_parms_ue
->
ofdm_symbol_size
*
rate_change
;
frame_parms_ue
->
samples_per_
tti
=
frame_parms_ue
->
samples_per_tti
*
rate_change
;
frame_parms_ue
->
samples_per_
slot
=
frame_parms_ue
->
samples_per_slot
*
rate_change
;
frame_parms_ue
->
samples_per_subframe
=
frame_parms_ue
->
samples_per_subframe
*
rate_change
;
free_context_pss_nr
();
...
...
@@ -610,9 +610,7 @@ void restore_frame_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue, int rate_ch
void
decimation_synchro_nr
(
PHY_VARS_NR_UE
*
PHY_vars_UE
,
int
rate_change
,
int
**
rxdata
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
(
PHY_vars_UE
->
frame_parms
);
int
samples_for_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
;
AssertFatal
(
frame_parms
->
samples_per_tti
>
3839
,
"Illegal samples_per_tti %d
\n
"
,
frame_parms
->
samples_per_tti
);
int
samples_for_frame
=
frame_parms
->
samples_per_frame
;
#if TEST_SYNCHRO_TIMING_PSS
...
...
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
View file @
c7dd406b
...
...
@@ -84,7 +84,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
uint32_t
f_gh
=
0
;
SRS_Resource_t
*
p_SRS_Resource
;
int
frame_number
=
proc
->
frame_tx
;
int
slot_number
=
proc
->
nr_
tti
_tx
;
int
slot_number
=
proc
->
nr_
slot
_tx
;
uint16_t
n_SRS
,
n_SRS_cs_i
;
double
alpha_i
;
uint8_t
K_TC_p
;
...
...
@@ -278,7 +278,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
n_SRS
=
l
/
R
;
}
else
{
int8_t
N_slot_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
tti
s_per_subframe
;
int8_t
N_slot_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
slot
s_per_subframe
;
n_SRS
=
((
N_slot_frame
*
frame_number
+
slot_number
-
T_offset
)
/
T_SRS
)
*
(
N_symb_SRS
/
R
)
+
(
l
/
R
);
}
...
...
@@ -399,7 +399,7 @@ int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource, NR_DL_FRAME_PARMS *frame_pa
return
(
-
1
);
}
int16_t
N_slot_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
tti
s_per_subframe
;
int16_t
N_slot_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
slot
s_per_subframe
;
if
((
N_slot_frame
*
frame_tx
+
slot_tx
-
T_offset
)
%
T_SRS
==
0
)
{
return
(
0
);
}
...
...
@@ -445,7 +445,7 @@ int ue_srs_procedure_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB
/* SRS resource configurated ? */
if
(
p_srs_resource
!=
NULL
)
{
if
(
p_srs_resource_set
->
resourceType
==
periodic
)
{
if
(
is_srs_period_nr
(
p_srs_resource
,
frame_parms
,
proc
->
frame_tx
,
proc
->
nr_
tti
_tx
)
==
0
)
{
if
(
is_srs_period_nr
(
p_srs_resource
,
frame_parms
,
proc
->
frame_tx
,
proc
->
nr_
slot
_tx
)
==
0
)
{
generate_srs
=
1
;
}
}
...
...
@@ -459,7 +459,7 @@ int ue_srs_procedure_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB
if
(
generate_srs
==
1
)
{
int16_t
txptr
=
AMP
;
uint16_t
nsymb
=
(
ue
->
frame_parms
.
Ncp
==
0
)
?
14
:
12
;
uint16_t
symbol_offset
=
(
int
)
ue
->
frame_parms
.
ofdm_symbol_size
*
((
proc
->
nr_
tti
_tx
*
nsymb
)
+
(
nsymb
-
1
));
uint16_t
symbol_offset
=
(
int
)
ue
->
frame_parms
.
ofdm_symbol_size
*
((
proc
->
nr_
slot
_tx
*
nsymb
)
+
(
nsymb
-
1
));
if
(
generate_srs_nr
(
p_srs_resource_set
,
frame_parms
,
&
ue
->
common_vars
.
txdataF
[
eNB_id
][
symbol_offset
],
txptr
,
proc
)
==
0
)
{
return
0
;
}
...
...
openair1/PHY/defs_nr_UE.h
View file @
c7dd406b
...
...
@@ -168,10 +168,10 @@ typedef struct {
/// timestamp transmitted to HW
openair0_timestamp
timestamp_tx
;
//#ifdef UE_NR_PHY_DEMO
/// NR
TTI index within subframe_tx [0 .. tti
s_per_subframe - 1] to act upon for transmission
int
nr_
tti
_tx
;
/// NR
TTI index within subframe_rx [0 .. tti
s_per_subframe - 1] to act upon for reception
int
nr_
tti
_rx
;
/// NR
slot index within subframe_tx [0 .. slot
s_per_subframe - 1] to act upon for transmission
int
nr_
slot
_tx
;
/// NR
slot index within subframe_rx [0 .. slot
s_per_subframe - 1] to act upon for reception
int
nr_
slot
_rx
;
//#endif
/// subframe to act upon for transmission
int
subframe_tx
;
...
...
@@ -1030,7 +1030,7 @@ typedef struct {
fapi_nr_dci_indication_t
dci_ind
;
// point to the current rxTx thread index
uint8_t
current_thread_id
[
10
];
uint8_t
current_thread_id
[
1
2
0
];
NR_UE_PDSCH
*
pdsch_vars
[
RX_NB_TH_MAX
][
NUMBER_OF_CONNECTED_eNB_MAX
+
1
];
// two RxTx Threads
NR_UE_PDSCH_FLP
*
pdsch_vars_flp
[
NUMBER_OF_CONNECTED_eNB_MAX
+
1
];
...
...
openair1/PHY/defs_nr_common.h
View file @
c7dd406b
...
...
@@ -259,8 +259,6 @@ typedef struct NR_DL_FRAME_PARMS {
uint32_t
samples_per_subframe
;
/// Number of samples in a slot
uint32_t
samples_per_slot
;
/// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
uint16_t
symbols_per_tti
;
/// Number of samples in a radio frame
uint32_t
samples_per_frame
;
/// Number of samples in a subframe without CP
...
...
@@ -269,14 +267,8 @@ typedef struct NR_DL_FRAME_PARMS {
uint32_t
samples_per_slot_wCP
;
/// Number of samples in a radio frame without CP
uint32_t
samples_per_frame_wCP
;
/// Number of samples in a tti (same as subrame in LTE, slot in NR)
uint32_t
samples_per_tti
;
/// NR numerology index [0..5] as specified in 38.211 Section 4 (mu). 0=15khZ SCS, 1=30khZ, 2=60kHz, etc
uint8_t
numerology_index
;
/// NR number of ttis per subframe deduced from numerology (cf 38.211): 1, 2, 4, 8(not supported),16(not supported),32(not supported)
uint8_t
ttis_per_subframe
;
/// NR number of slots per tti . Assumption only 2 Slot per TTI is supported (Slot Config 1 in 38.211)
uint8_t
slots_per_tti
;
//#endif
/// Number of Physical transmit antennas in node
uint8_t
nb_antennas_tx
;
...
...
openair1/SCHED_NR_UE/harq_nr.c
View file @
c7dd406b
...
...
@@ -114,7 +114,7 @@
*********************************************************************/
void
get_dci_info_for_harq
(
PHY_VARS_NR_UE
*
ue
,
NR_DCI_INFO_EXTRACTED_t
*
nr_dci_info_extracted
,
NR_UE_DLSCH_t
**
dlsch
,
NR_UE_ULSCH_t
*
ulsch
,
uint8_t
nr_
tti
_rx
,
uint8_t
tx_offset
)
NR_UE_DLSCH_t
**
dlsch
,
NR_UE_ULSCH_t
*
ulsch
,
uint8_t
nr_
slot
_rx
,
uint8_t
tx_offset
)
{
if
(
nr_dci_info_extracted
->
identifier_dci_formats
==
DL_DCI
)
{
...
...
@@ -124,14 +124,14 @@ void get_dci_info_for_harq(PHY_VARS_NR_UE *ue, NR_DCI_INFO_EXTRACTED_t *nr_dci_i
dl_harq
->
harq_ack
.
vDAI_DL
=
nr_dci_info_extracted
->
dai
+
1
;
dl_harq
->
harq_ack
.
pucch_resource_indicator
=
nr_dci_info_extracted
->
pucch_resource_ind
;
dl_harq
->
harq_ack
.
slot_for_feedback_ack
=
(
nr_
tti_rx
+
nr_dci_info_extracted
->
pdsch_to_harq_feedback_time_ind
)
%
ue
->
frame_parms
.
tti
s_per_subframe
;
dl_harq
->
harq_ack
.
slot_for_feedback_ack
=
(
nr_
slot_rx
+
nr_dci_info_extracted
->
pdsch_to_harq_feedback_time_ind
)
%
ue
->
frame_parms
.
slot
s_per_subframe
;
dl_harq
->
harq_ack
.
harq_id
=
nr_dci_info_extracted
->
harq_process_number
;
dl_harq
->
harq_ack
.
rx_status
=
downlink_harq_process
(
dl_harq
,
dlsch
[
0
]
->
current_harq_pid
,
nr_dci_info_extracted
->
ndi
,
dlsch
[
0
]
->
rnti_type
);
}
else
if
(
nr_dci_info_extracted
->
identifier_dci_formats
==
UL_DCI
)
{
/* store harq id for which pusch should be transmitted at rx_slot + tx_offset */
set_tx_harq_id
(
ulsch
,
nr_dci_info_extracted
->
harq_process_number
,
(
nr_
tti_rx
+
tx_offset
)
%
ue
->
frame_parms
.
tti
s_per_subframe
);
set_tx_harq_id
(
ulsch
,
nr_dci_info_extracted
->
harq_process_number
,
(
nr_
slot_rx
+
tx_offset
)
%
ue
->
frame_parms
.
slot
s_per_subframe
);
ulsch
->
harq_processes
[
nr_dci_info_extracted
->
harq_process_number
]
->
tx_status
=
uplink_harq_process
(
ulsch
,
nr_dci_info_extracted
->
harq_process_number
,
nr_dci_info_extracted
->
ndi
,
ulsch
->
rnti_type
);
}
}
...
...
openair1/SCHED_NR_UE/phy_frame_config_nr.c
View file @
c7dd406b
...
...
@@ -55,7 +55,7 @@ int set_tdd_config_nr(NR_DL_FRAME_PARMS *frame_parms, int dl_UL_TransmissionPeri
{
TDD_UL_DL_configCommon_t
*
p_tdd_ul_dl_configuration
;
int
slot_number
=
0
;
int
nb_slots_to_set
=
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
tti
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
int
nb_slots_to_set
=
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
slot
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
/* allocate buffer for configuration structure */
p_tdd_ul_dl_configuration
=
calloc
(
1
,
sizeof
(
TDD_UL_DL_configCommon_t
));
...
...
@@ -78,7 +78,7 @@ int set_tdd_config_nr(NR_DL_FRAME_PARMS *frame_parms, int dl_UL_TransmissionPeri
int
nb_periods_per_frame
=
(
FRAME_DURATION_MICRO_SEC
/
dl_UL_TransmissionPeriodicity
);
int
nb_slots_per_period
=
(
frame_parms
->
tti
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
/
nb_periods_per_frame
;
int
nb_slots_per_period
=
(
frame_parms
->
slot
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
/
nb_periods_per_frame
;
if
(
nb_slots_per_period
!=
(
nrofDownlinkSlots
+
nrofUplinkSlots
))
{
LOG_E
(
PHY
,
"set_tdd_configuration_nr: given period is inconsistent with current tdd configuration
\n
"
);
...
...
@@ -189,7 +189,7 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms)
while
(
p_current_TDD_UL_DL_SlotConfig
!=
NULL
)
{
int
slot_index
=
p_current_TDD_UL_DL_SlotConfig
->
slotIndex
;
if
(
slot_index
<
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
tti
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
{
if
(
slot_index
<
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
slot
s_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
))
{
if
(
p_current_TDD_UL_DL_SlotConfig
->
nrofDownlinkSymbols
!=
0
)
{
if
(
p_current_TDD_UL_DL_SlotConfig
->
nrofDownlinkSymbols
==
NR_TDD_SET_ALL_SYMBOLS
)
{
if
(
p_current_TDD_UL_DL_SlotConfig
->
nrofUplinkSymbols
==
0
)
{
...
...
@@ -250,7 +250,7 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms)
*
*********************************************************************/
int
slot_select_nr
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
nr_frame
,
int
nr_
tti
)
int
slot_select_nr
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
nr_frame
,
int
nr_
slot
)
{
/* for FFD all slot can be considered as an uplink */
if
(
frame_parms
->
frame_type
==
FDD
)
{
...
...
@@ -258,14 +258,14 @@ int slot_select_nr(NR_DL_FRAME_PARMS *frame_parms, int nr_frame, int nr_tti)
}
if
(
nr_frame
%
2
==
0
)
{
if
(
frame_parms
->
tdd_uplink_nr
[
nr_
tti
]
==
NR_TDD_UPLINK_SLOT
)
{
if
(
frame_parms
->
tdd_uplink_nr
[
nr_
slot
]
==
NR_TDD_UPLINK_SLOT
)
{
return
(
NR_UPLINK_SLOT
);
}
else
{
return
(
NR_DOWNLINK_SLOT
);
}
}
else
if
((
frame_parms
->
tdd_uplink_nr
[(
frame_parms
->
ttis_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
+
nr_tti
]
==
NR_TDD_UPLINK_SLOT
))
{
else
if
((
frame_parms
->
tdd_uplink_nr
[(
frame_parms
->
slots_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
+
nr_slot
]
==
NR_TDD_UPLINK_SLOT
))
{
return
(
NR_UPLINK_SLOT
);
}
else
{
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
c7dd406b
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
View file @
c7dd406b
...
...
@@ -158,8 +158,8 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_pro
int
K_PUCCH
=
0
;
if
(
O_ACK
!=
0
)
{
/* it assumes that PDCCH is in the first symbol of receive slot FFS TDDO NR */
int
slots_gap
=
(
proc
->
nr_
tti_tx
>
proc
->
nr_tti_rx
?
(
proc
->
nr_tti_tx
-
proc
->
nr_tti_rx
-
1
)
:
((
proc
->
nr_tti_tx
+
ue
->
frame_parms
.
ttis_per_subframe
)
-
proc
->
nr_tti
_rx
-
1
));
K_PUCCH
=
(
slots_gap
*
(
ue
->
frame_parms
.
symbols_per_
tti
))
-
1
;
int
slots_gap
=
(
proc
->
nr_
slot_tx
>
proc
->
nr_slot_rx
?
(
proc
->
nr_slot_tx
-
proc
->
nr_slot_rx
-
1
)
:
((
proc
->
nr_slot_tx
+
ue
->
frame_parms
.
slots_per_subframe
)
-
proc
->
nr_slot
_rx
-
1
));
K_PUCCH
=
(
slots_gap
*
(
ue
->
frame_parms
.
symbols_per_
slot
))
-
1
;
}
else
{
/* field k2 is not present - to check k2 of pucch from upper layer FFS TDDO NR */
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
c7dd406b
This diff is collapsed.
Click to expand it.
targets/RT/USER/nr-ue.c
View file @
c7dd406b
...
...
@@ -676,7 +676,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
// Process Rx data for one sub-frame
if
(
slot_select_nr
(
&
UE
->
frame_parms
,
proc
->
frame_tx
,
proc
->
nr_
tti
_tx
)
&
NR_DOWNLINK_SLOT
)
{
if
(
slot_select_nr
(
&
UE
->
frame_parms
,
proc
->
frame_tx
,
proc
->
nr_
slot
_tx
)
&
NR_DOWNLINK_SLOT
)
{
//clean previous FAPI MESSAGE
UE
->
rx_ind
.
number_pdus
=
0
;
...
...
@@ -688,12 +688,13 @@ static void *UE_thread_rxn_txnp4(void *arg) {
UE
->
dcireq
.
gNB_index
=
0
;
UE
->
dcireq
.
cc_id
=
0
;
UE
->
dcireq
.
frame
=
proc
->
frame_rx
;
UE
->
dcireq
.
slot
=
proc
->
nr_
tti
_rx
;
UE
->
dcireq
.
slot
=
proc
->
nr_
slot
_rx
;
nr_ue_dcireq
(
&
UE
->
dcireq
);
//to be replaced with function pointer later
NR_UE_MAC_INST_t
*
UE_mac
=
get_mac_inst
(
0
);
UE_mac
->
scheduled_response
.
dl_config
=
&
UE
->
dcireq
.
dl_config_req
;
nr_ue_scheduled_response
(
&
UE_mac
->
scheduled_response
);
#ifdef UE_SLOT_PARALLELISATION
phy_procedures_slot_parallelization_nrUE_RX
(
UE
,
proc
,
0
,
0
,
1
,
UE
->
mode
,
no_relay
,
NULL
);
...
...
@@ -718,7 +719,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
UE
->
ul_indication
.
gNB_index
=
0
;
UE
->
ul_indication
.
cc_id
=
0
;
UE
->
ul_indication
.
frame
=
proc
->
frame_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_
tti
_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_
slot
_rx
;
UE
->
if_inst
->
ul_indication
(
&
UE
->
ul_indication
);
}
...
...
@@ -732,7 +733,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
// Prepare the future Tx data
#if 0
#ifndef NO_RAT_NR
if (slot_select_nr(&UE->frame_parms, proc->frame_tx, proc->nr_
tti
_tx) & NR_UPLINK_SLOT)
if (slot_select_nr(&UE->frame_parms, proc->frame_tx, proc->nr_
slot
_tx) & NR_UPLINK_SLOT)
#else
if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) ||
(UE->frame_parms.frame_type == FDD) )
...
...
@@ -1026,16 +1027,15 @@ void *UE_thread(void *arg) {
UE
->
proc
.
proc_rxtx
[
th_id
].
gotIQs
=
readTime
(
gotIQs
);
}
proc
->
nr_
tti_rx
=
subframe_nr
;
proc
->
nr_
slot_rx
=
subframe_nr
*
UE
->
frame_parms
.
slots_per_subframe
;
proc
->
subframe_rx
=
subframe_nr
;
proc
->
frame_tx
=
proc
->
frame_rx
;
proc
->
nr_tti
_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
nr_tti
_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
subframe
_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
subframe
_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
frame_tx
=
(
proc
->
frame_tx
+
1
)
%
MAX_FRAME_NUMBER
;
proc
->
nr_tti
_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
proc
->
subframe
_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
}
proc
->
subframe_tx
=
proc
->
nr_tti_rx
;
proc
->
timestamp_tx
=
timestamp
+
(
DURATION_RX_TO_TX
*
UE
->
frame_parms
.
samples_per_subframe
)
-
UE
->
frame_parms
.
ofdm_symbol_size
-
UE
->
frame_parms
.
nb_prefix_samples0
;
...
...
@@ -1073,7 +1073,6 @@ void *UE_thread(void *arg) {
// pickStaticTime(lastTime);
}
//UE->mode != loop_through_memory
else
{
proc
->
nr_tti_rx
=
subframe_nr
;
proc
->
subframe_rx
=
subframe_nr
;
if
(
subframe_nr
==
0
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH
;
th_id
++
)
{
...
...
@@ -1081,14 +1080,16 @@ void *UE_thread(void *arg) {
}
}
proc
->
frame_tx
=
proc
->
frame_rx
;
proc
->
nr_tti
_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
nr_tti
_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
subframe
_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
subframe
_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
frame_tx
=
(
proc
->
frame_tx
+
1
)
%
MAX_FRAME_NUMBER
;
proc
->
nr_tti
_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
proc
->
subframe
_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
}
proc
->
subframe_tx
=
proc
->
nr_tti_tx
;
if
(
slot_select_nr
(
&
UE
->
frame_parms
,
proc
->
frame_tx
,
proc
->
nr_tti_tx
)
&
NR_DOWNLINK_SLOT
)
{
for
(
proc
->
nr_slot_rx
=
proc
->
subframe_rx
*
UE
->
frame_parms
.
slots_per_subframe
;
proc
->
nr_slot_rx
<
(
proc
->
subframe_rx
+
1
)
*
UE
->
frame_parms
.
slots_per_subframe
;
proc
->
nr_slot_rx
++
)
{
if
(
slot_select_nr
(
&
UE
->
frame_parms
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
)
&
NR_DOWNLINK_SLOT
)
{
//clean previous FAPI MESSAGE
UE
->
rx_ind
.
number_pdus
=
0
;
...
...
@@ -1100,7 +1101,7 @@ void *UE_thread(void *arg) {
UE
->
dcireq
.
gNB_index
=
0
;
UE
->
dcireq
.
cc_id
=
0
;
UE
->
dcireq
.
frame
=
proc
->
frame_rx
;
UE
->
dcireq
.
slot
=
proc
->
nr_
tti
_rx
;
UE
->
dcireq
.
slot
=
proc
->
nr_
slot
_rx
;
nr_ue_dcireq
(
&
UE
->
dcireq
);
//to be replaced with function pointer later
NR_UE_MAC_INST_t
*
UE_mac
=
get_mac_inst
(
0
);
...
...
@@ -1108,7 +1109,7 @@ void *UE_thread(void *arg) {
nr_ue_scheduled_response
(
&
UE_mac
->
scheduled_response
);
printf
(
"Processing subframe %d
\n
"
,
proc
->
subframe
_rx
);
printf
(
"Processing subframe %d
slot %d
\n
"
,
proc
->
subframe_rx
,
proc
->
nr_slot
_rx
);
phy_procedures_nrUE_RX
(
UE
,
proc
,
0
,
1
,
UE
->
mode
);
}
...
...
@@ -1117,12 +1118,13 @@ void *UE_thread(void *arg) {
UE
->
ul_indication
.
gNB_index
=
0
;
UE
->
ul_indication
.
cc_id
=
0
;
UE
->
ul_indication
.
frame
=
proc
->
frame_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_
tti
_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_
slot
_rx
;
UE
->
if_inst
->
ul_indication
(
&
UE
->
ul_indication
);
}
getchar
();
}
}
// else loop_through_memory
}
// start_rx_stream==1
}
// UE->is_synchronized==1
...
...
targets/RT/USER/nr-uesoftmodem.c
View file @
c7dd406b
...
...
@@ -696,11 +696,6 @@ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
// NR: Init to legacy LTE 20Mhz params
frame_parms
[
CC_id
]
->
numerology_index
=
0
;
frame_parms
[
CC_id
]
->
ttis_per_subframe
=
1
;
frame_parms
[
CC_id
]
->
slots_per_tti
=
2
;
}
}
...
...
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