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
wangwenhui
OpenXG-RAN
Commits
e7b2c473
Commit
e7b2c473
authored
Nov 12, 2020
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/nr_fdd_if_fix' into integration_2020_wk46
parents
536125c3
f2502eeb
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
51 additions
and
74 deletions
+51
-74
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+0
-2
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-18
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+0
-4
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
+2
-2
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-7
openair1/PHY/thread_NR_UE.h
openair1/PHY/thread_NR_UE.h
+2
-2
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+1
-1
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+3
-3
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
+1
-1
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+3
-3
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+3
-3
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c
...1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c
+7
-6
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
...air1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
+18
-14
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c
+5
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
No files found.
openair1/PHY/INIT/nr_parms.c
View file @
e7b2c473
...
...
@@ -84,8 +84,6 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp)
void
set_scs_parameters
(
NR_DL_FRAME_PARMS
*
fp
,
int
mu
,
uint16_t
bw
)
{
fp
->
ttis_per_subframe
=
1
;
switch
(
mu
)
{
case
NR_MU_0
:
//15kHz scs
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
View file @
e7b2c473
...
...
@@ -59,7 +59,7 @@
uint8_t
nr_subframe2harq_pid
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
nr_tti_rx
)
{
uint8_t
nr_subframe2harq_pid
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
slot
)
{
/*
#ifdef DEBUG_DCI
if (frame_parms->frame_type == TDD)
...
...
@@ -69,11 +69,11 @@ uint8_t nr_subframe2harq_pid(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8
#endif
*/
uint8_t
ret
=
255
;
uint8_t
subframe
=
nr_tti_rx
>>
((
int
)(
log2
(
frame_parms
->
ttis_per_subframe
)))
;
uint8_t
subframe
=
slot
/
frame_parms
->
slots_per_subframe
;
AssertFatal
(
1
==
0
,
"Not ready for this ...
\n
"
);
if
(
frame_parms
->
frame_type
==
FDD
)
{
ret
=
(((
frame
<<
1
)
+
nr_tti_rx
)
&
7
);
ret
=
(((
frame
<<
1
)
+
slot
)
&
7
);
}
else
{
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
e7b2c473
...
...
@@ -296,7 +296,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
(
dlsch
->
max_ldpc_iterations
+
1
);
}
/*if (nr_tti_rx> (
10*frame_parms->tti
s_per_subframe-1)) {
/*if (nr_tti_rx> (
frame_parms->slot
s_per_subframe-1)) {
printf("dlsch_decoding.c: Illegal subframe index %d\n",nr_tti_rx);
return(dlsch->max_ldpc_iterations + 1);
}*/
...
...
@@ -649,14 +649,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
int32_t
frame_rx_prev
=
frame
;
int32_t
tti_rx_prev
=
nr_tti_rx
-
1
;
if
(
tti_rx_prev
<
0
)
{
frame_rx_prev
--
;
tti_rx_prev
+=
10
*
frame_parms
->
ttis_per_subframe
;
}
frame_rx_prev
=
frame_rx_prev
%
1024
;
if
(
err_flag
==
1
)
{
//#if UE_DEBUG_TRACE
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
...
...
@@ -843,7 +835,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
return
(
dlsch
->
max_ldpc_iterations
);
}
/* if (nr_tti_rx> (
10*frame_parms->tti
s_per_subframe-1)) {
/* if (nr_tti_rx> (
frame_parms->slot
s_per_subframe-1)) {
printf("dlsch_decoding.c: Illegal subframe index %d\n",nr_tti_rx);
return(dlsch->max_ldpc_iterations);
}
...
...
@@ -1246,14 +1238,6 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
}
//} //loop r
int32_t
frame_rx_prev
=
frame
;
int32_t
tti_rx_prev
=
nr_tti_rx
-
1
;
if
(
tti_rx_prev
<
0
)
{
frame_rx_prev
--
;
tti_rx_prev
+=
10
*
frame_parms
->
ttis_per_subframe
;
}
frame_rx_prev
=
frame_rx_prev
%
1024
;
if
(
err_flag
==
1
)
{
#if UE_DEBUG_TRACE
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
e7b2c473
...
...
@@ -560,7 +560,6 @@ 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_subframe
=
(
frame_parms_ue
->
samples_per_subframe
/
rate_change
);
free_context_pss_nr
();
...
...
@@ -588,7 +587,6 @@ 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_subframe
=
frame_parms_ue
->
samples_per_subframe
*
rate_change
;
free_context_pss_nr
();
...
...
@@ -620,8 +618,6 @@ void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change, int **r
NR_DL_FRAME_PARMS
*
frame_parms
=
&
(
PHY_vars_UE
->
frame_parms
);
int
samples_for_frame
=
2
*
frame_parms
->
samples_per_frame
;
AssertFatal
(
frame_parms
->
samples_per_tti
>
3839
,
"Illegal samples_per_tti %d
\n
"
,
frame_parms
->
samples_per_tti
);
#if TEST_SYNCHRO_TIMING_PSS
opp_enabled
=
1
;
...
...
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
View file @
e7b2c473
...
...
@@ -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
->
ttis_per_sub
frame
;
int8_t
N_slot_frame
=
frame_parms
->
slots_per_
frame
;
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
->
ttis_per_sub
frame
;
int16_t
N_slot_frame
=
frame_parms
->
slots_per_
frame
;
if
((
N_slot_frame
*
frame_tx
+
slot_tx
-
T_offset
)
%
T_SRS
==
0
)
{
return
(
0
);
}
...
...
openair1/PHY/defs_nr_common.h
View file @
e7b2c473
...
...
@@ -301,8 +301,6 @@ struct NR_DL_FRAME_PARMS {
uint32_t
samples_per_slot0
;
/// Number of samples in other slots of the subframe
uint32_t
samples_per_slotN0
;
/// 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
...
...
@@ -311,13 +309,8 @@ 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
;
//#endif
/// Number of Physical transmit antennas in node
uint8_t
nb_antennas_tx
;
/// Number of Receive antennas in node
...
...
openair1/PHY/thread_NR_UE.h
View file @
e7b2c473
...
...
@@ -11,9 +11,9 @@ 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
/// NR TTI index within subframe_tx [0 ..
slot
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
/// NR TTI index within subframe_rx [0 ..
slot
s_per_subframe - 1] to act upon for reception
int
nr_tti_rx
;
/// NR slot index within frame_tx [0 .. slots_per_frame - 1] to act upon for transmission
int
nr_slot_tx
;
...
...
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
e7b2c473
...
...
@@ -252,7 +252,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
->
ttis_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
)
{
if
(
slot_index
<
TDD_CONFIG_NB_FRAMES
*
frame_parms
->
slots_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
)
{
...
...
openair1/SCHED_NR_UE/harq_nr.c
View file @
e7b2c473
...
...
@@ -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
slot
,
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
=
(
slot
+
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
,
(
slot
+
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/pucch_power_control_ue_nr.c
View file @
e7b2c473
...
...
@@ -169,7 +169,7 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue,
//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.
tti
s_per_subframe) - proc->nr_tti_rx - 1));
//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.
slot
s_per_subframe) - proc->nr_tti_rx - 1));
//K_PUCCH = (slots_gap * (ue->frame_parms.symbols_per_tti)) - 1;
}
else
{
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
e7b2c473
...
...
@@ -238,7 +238,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/* update current context */
int
subframe_number
=
(
proc
->
nr_tti_rx
)
/
(
ue
->
frame_parms
.
slots_per_subframe
);
//ttis_per_subframe)
;
int
subframe_number
=
proc
->
nr_slot_rx
/
ue
->
frame_parms
.
slots_per_subframe
;
nb_pucch_format_4_in_subframes
[
subframe_number
]
=
0
;
/* reset pucch format 4 counter at current rx position */
int
dl_harq_pid
=
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
current_harq_pid
;
...
...
@@ -490,7 +490,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
//}
nb_symbols
=
nb_symbols_excluding_dmrs
[
nb_symbols_total
-
4
][
index_additional_dmrs
][
index_hopping
];
nb_of_prbs
=
1
;
subframe_number
=
nr_tti_tx
/
(
ue
->
frame_parms
.
slots_per_subframe
);
//ttis_per_subframe)
;
subframe_number
=
nr_tti_tx
/
ue
->
frame_parms
.
slots_per_subframe
;
nb_pucch_format_4_in_subframes
[
subframe_number
]
++
;
/* increment number of transmit pucch 4 in current subframe */
NR_TST_PHY_PRINTF
(
"PUCCH Number of pucch format 4 in subframe %d is %d
\n
"
,
subframe_number
,
nb_pucch_format_4_in_subframes
[
subframe_number
]);
N_sc_ctrl_RB
=
N_SC_RB
/
(
nb_pucch_format_4_in_subframes
[
subframe_number
]);
...
...
@@ -1277,7 +1277,7 @@ int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_n
return
(
1
);
/* period is slot */
}
int16_t
N_slot_frame
=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
ue
->
frame_parms
.
slots_per_subframe
;
//ttis_per_sub
frame;
int16_t
N_slot_frame
=
ue
->
frame_parms
.
slots_per_
frame
;
if
(((
proc
->
frame_tx
*
N_slot_frame
)
+
proc
->
nr_tti_tx
-
SR_offset
)
%
SR_periodicity
==
0
)
{
return
(
1
);
}
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
e7b2c473
...
...
@@ -116,9 +116,9 @@ int main(int argc, char **argv){
int
i
,
aa
,
aarx
,
**
txdata
,
trial
,
n_frames
=
1
,
prach_start
,
rx_prach_start
;
//, ntrials=1;
int
N_RB_UL
=
106
,
delay
=
0
,
NCS_config
=
13
,
rootSequenceIndex
=
1
,
threequarter_fs
=
0
,
mu
=
1
,
fd_occasion
=
0
,
loglvl
=
OAILOG_INFO
,
numRA
=
0
,
prachStartSymbol
=
0
;
uint8_t
snr1set
=
0
,
ue_speed1set
=
0
,
transmission_mode
=
1
,
n_tx
=
1
,
n_rx
=
1
,
awgn_flag
=
0
,
msg1_frequencystart
=
0
,
num_prach_fd_occasions
=
1
,
prach_format
=
0
;
uint8_t
frame
=
1
,
subframe
=
9
,
slot
=
19
,
slot_gNB
=
19
,
config_index
=
98
,
prach_sequence_length
=
1
,
num_root_sequences
=
16
,
restrictedSetConfig
=
0
,
N_dur
,
N_t_slot
,
start_symbol
;
uint8_t
frame
=
1
,
subframe
=
9
,
slot
=
19
,
slot_gNB
=
19
,
config_index
=
98
,
prach_sequence_length
=
1
,
restrictedSetConfig
=
0
,
N_dur
,
N_t_slot
,
start_symbol
;
uint16_t
Nid_cell
=
0
,
preamble_tx
=
0
,
preamble_delay
,
format
,
format0
,
format1
;
uint32_t
tx_lev
=
10000
,
prach_errors
=
0
,
samp_count
;
//,tx_lev_dB;
uint32_t
tx_lev
=
10000
,
prach_errors
=
0
;
//,tx_lev_dB;
uint64_t
SSB_positions
=
0x01
,
absoluteFrequencyPointA
=
640000
;
uint16_t
RA_sfn_index
;
uint8_t
N_RA_slot
;
...
...
@@ -705,7 +705,7 @@ int main(int argc, char **argv){
// printf("Sigma2 %f (sigma2_dB %f)\n",sigma2,sigma2_dB);
if
(
awgn_flag
==
0
)
{
multipath_tv_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
frame_parms
->
samples_per_
tti
<<
1
,
0
);
multipath_tv_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
frame_parms
->
samples_per_
frame
,
0
);
}
if
(
n_frames
==
1
)
{
...
...
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c
View file @
e7b2c473
...
...
@@ -51,16 +51,16 @@
void
display_frame_configuration
(
NR_DL_FRAME_PARMS
*
frame_parms
)
{
printf
(
"
\n
Tdd configuration tti %d downlink %d uplink %d period %d
\n
"
,
frame_parms
->
tti
s_per_subframe
,
frame_parms
->
p_tdd_UL_DL_Configuration
->
nrofDownlinkSlots
,
printf
(
"
\n
Tdd configuration tti %d downlink %d uplink %d period %d
\n
"
,
frame_parms
->
slot
s_per_subframe
,
frame_parms
->
p_tdd_UL_DL_Configuration
->
nrofDownlinkSlots
,
frame_parms
->
p_tdd_UL_DL_Configuration
->
nrofUplinkSlots
,
frame_parms
->
p_tdd_UL_DL_Configuration
->
dl_UL_TransmissionPeriodicity
);
int
k
=
(
TDD_CONFIG_NB_FRAMES
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
-
1
;
//19;
int
tti
=
0
;
for
(
int
j
=
0
;
j
<
TDD_CONFIG_NB_FRAMES
*
frame_parms
->
ttis_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
j
++
)
{
for
(
int
j
=
0
;
j
<
TDD_CONFIG_NB_FRAMES
*
frame_parms
->
slots_per_frame
;
j
++
)
{
int
frame
=
0
;
if
(
j
!=
0
)
{
frame
=
(
frame_parms
->
ttis_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
/
j
;
tti
=
(
j
)
%
(
frame_parms
->
ttis_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
;
frame
=
j
/
frame_parms
->
slots_per_frame
;
tti
=
j
%
frame_parms
->
slots_per_frame
;
}
else
{
frame
=
0
;
...
...
@@ -99,9 +99,10 @@ void display_frame_configuration(NR_DL_FRAME_PARMS *frame_parms) {
*
*********************************************************************/
void
set_tti_test
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
tti
s_per_subframe
)
void
set_tti_test
(
NR_DL_FRAME_PARMS
*
frame_parms
,
int
slot
s_per_subframe
)
{
frame_parms
->
ttis_per_subframe
=
ttis_per_subframe
;
frame_parms
->
slots_per_subframe
=
slots_per_subframe
;
frame_parms
->
slots_per_frame
=
slots_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
}
/*******************************************************************
...
...
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
View file @
e7b2c473
...
...
@@ -182,7 +182,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
/* set a tx slot with no ack */
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
TST_DL_HARQ_PID_FIRST
].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
printf
(
"
\n
=> Test : Error due to acknownlegment not set
\n
"
);
...
...
@@ -300,7 +300,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
2
;
harq_status
->
ack
=
DL_ACK
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
printf
(
"
\n
=> Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments
\n
"
);
...
...
@@ -567,7 +567,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
TST_DL_HARQ_PID_FIRST
].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -586,7 +586,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
dl_harq_pid
[
i
]].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
i
+
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -620,7 +620,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
dl_harq_pid
[
i
]].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
i
+
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -684,7 +684,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
code_word
]
->
harq_processes
[
dl_harq_pid
[
i
]].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
i
+
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -727,7 +727,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
code_word
]
->
harq_processes
[
dl_harq_pid
[
i
]].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
i
+
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -761,7 +761,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
NR_UE_HARQ_STATUS_t
*
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
code_word
]
->
harq_processes
[
dl_harq_pid
[
i
]].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
i
+
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -980,7 +980,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
TST_DL_HARQ_PID_FIRST
].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -1019,7 +1019,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
TST_DL_HARQ_PID_SECOND
].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
2
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -1094,7 +1094,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
harq_status
=
&
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
nr_tti_rx
]][
gNB_id
][
0
]
->
harq_processes
[
TST_DL_HARQ_PID_FIRST
].
harq_ack
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
tti
_tx
;
harq_status
->
slot_for_feedback_ack
=
proc
->
nr_
slot
_tx
;
harq_status
->
send_harq_status
=
1
;
harq_status
->
vDAI_DL
=
1
;
harq_status
->
ack
=
DL_ACK
;
...
...
@@ -1168,9 +1168,13 @@ int test_pucch(PHY_VARS_NR_UE *ue)
assert
(
0
);
}
proc
->
frame_tx
=
0
;
proc
->
nr_tti_rx
=
0
;
proc
->
nr_tti_tx
=
(
proc
->
nr_tti_rx
+
NR_UE_CAPABILITY_SLOT_RX_TO_TX
)
%
(
ue
->
frame_parms
.
ttis_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
proc
->
frame_rx
=
0
;
proc
->
nr_slot_rx
=
0
;
proc
->
nr_tti_rx
=
0
;
proc
->
frame_tx
=
proc
->
frame_rx
+
(
proc
->
nr_slot_rx
+
NR_UE_CAPABILITY_SLOT_RX_TO_TX
)
/
ue
->
frame_parms
.
slots_per_frame
;
proc
->
nr_slot_tx
=
(
proc
->
nr_slot_rx
+
NR_UE_CAPABILITY_SLOT_RX_TO_TX
)
%
ue
->
frame_parms
.
slots_per_frame
;
proc
->
nr_tti_tx
=
proc
->
nr_slot_tx
%
ue
->
frame_parms
.
slots_per_subframe
;
init_pucch_power_configuration
(
ue
,
gNB_id
);
...
...
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c
View file @
e7b2c473
...
...
@@ -223,12 +223,13 @@ int test_srs_periodicity(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
}
printf
(
"srs period %d offset %d
\n
"
,
srs_current_period
,
p_srs_resource
->
SRS_Offset
);
int
duration
=
(
10
*
srs_current_period
)
/
(
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
ttis_per_subframe
)
;
int
duration
=
(
10
*
srs_current_period
)
/
frame_parms
->
slots_per_frame
;
for
(
int
frame_tx
=
0
;
frame_tx
<
duration
;
frame_tx
++
)
{
for
(
int
slot_tx
=
0
;
slot_tx
<
(
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
ttis_per_subframe
);
slot_tx
++
)
{
proc
->
frame_tx
=
frame_tx
;
proc
->
nr_tti_tx
=
slot_tx
;
for
(
int
slot_tx
=
0
;
slot_tx
<
frame_parms
->
slots_per_frame
;
slot_tx
++
)
{
proc
->
frame_tx
=
frame_tx
;
proc
->
nr_slot_tx
=
slot_tx
;
proc
->
nr_tti_tx
=
slot_tx
%
frame_parms
->
slots_per_subframe
;
if
(
ue_srs_procedure_nr
(
ue
,
proc
,
0
)
==
0
)
{
printf
(
"test_srs_periodicity srs at frame %d slot %d
\n
"
,
frame_tx
,
slot_tx
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
e7b2c473
...
...
@@ -449,7 +449,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
break
;
default:
AssertFatal
(
1
==
0
,
"Undefined tdd period %d
\n
"
,
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
);
AssertFatal
(
1
==
0
,
"Undefined tdd period %
l
d
\n
"
,
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
);
}
int
num_slots_per_tdd
=
(
slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
])
/
nb_periods_per_frame
;
...
...
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