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
b0903e20
Commit
b0903e20
authored
Aug 22, 2020
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change timing advance to only affect the TX timestamp, not the position in the "txdata" buffer
parent
1ca238dc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
110 deletions
+24
-110
executables/nr-ue.c
executables/nr-ue.c
+1
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+0
-6
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+8
-47
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+14
-54
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+0
-1
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+1
-1
No files found.
executables/nr-ue.c
View file @
b0903e20
...
...
@@ -797,7 +797,7 @@ void *UE_thread(void *arg) {
timestamp
+
UE
->
frame_parms
.
get_samples_slot_timestamp
(
slot_nr
,
&
UE
->
frame_parms
,
DURATION_RX_TO_TX
-
RX_NB_TH
)
-
firstSymSamp
-
openair0_cfg
[
0
].
tx_sample_advance
,
openair0_cfg
[
0
].
tx_sample_advance
-
UE
->
N_TA_offset
-
UE
->
timing_advance
,
txp
,
writeBlockSize
,
UE
->
frame_parms
.
nb_antennas_tx
,
...
...
executables/nr-uesoftmodem.c
View file @
b0903e20
...
...
@@ -767,13 +767,7 @@ int main( int argc, char **argv ) {
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_UE_g
[
0
][
CC_id
]
->
rf_map
.
card
=
0
;
PHY_vars_UE_g
[
0
][
CC_id
]
->
rf_map
.
chain
=
CC_id
+
chain_offset
;
#if defined(OAI_USRP) || defined(OAI_ADRV9371_ZC706)
PHY_vars_UE_g
[
0
][
CC_id
]
->
hw_timing_advance
=
timing_advance
;
PHY_vars_UE_g
[
0
][
CC_id
]
->
timing_advance
=
timing_advance
;
#else
PHY_vars_UE_g
[
0
][
CC_id
]
->
hw_timing_advance
=
160
;
#endif
}
init_NR_UE_threads
(
1
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
b0903e20
...
...
@@ -71,7 +71,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
int16_t
prach_tmp
[
98304
*
2
*
4
]
__attribute__
((
aligned
(
32
)));
int16_t
Ncp
=
0
,
amp
,
*
prach
,
*
prach2
,
*
prachF
,
*
Xu
;
int32_t
Xu_re
,
Xu_im
,
samp_count
;
int32_t
Xu_re
,
Xu_im
;
int
prach_start
,
prach_sequence_length
,
i
,
prach_len
,
dftlen
,
mu
,
kbar
,
K
,
n_ra_prb
,
k
;
//int restricted_Type;
...
...
@@ -103,22 +103,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
nrUE_config
->
prach_config
.
num_prach_fd_occasions_list
[
fd_occasion
].
prach_root_sequence_index
,
ue
->
X_u
);
if
(
mu
==
0
)
samp_count
=
fp
->
samples_per_subframe
;
else
samp_count
=
(
slot
%
(
fp
->
slots_per_subframe
/
2
))
?
fp
->
samples_per_slotN0
:
fp
->
samples_per_slot0
;
#ifdef OAI_USRP
prach_start
=
(
ue
->
rx_offset
+
slot
*
samp_count
-
ue
->
hw_timing_advance
-
ue
->
N_TA_offset
);
#else //normal case (simulation)
prach_start
=
slot
*
samp_count
-
ue
->
N_TA_offset
;
#endif
if
(
prach_start
<
0
)
prach_start
+=
(
fp
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
);
if
(
prach_start
>=
(
fp
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
))
prach_start
-=
(
fp
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
);
prach_start
=
fp
->
get_samples_slot_timestamp
(
slot
,
fp
,
0
);
// First compute physical root sequence
/************************************************************************
...
...
@@ -796,40 +781,16 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
}
#ifdef NR_PRACH_DEBUG
LOG_I
(
PHY
,
"PRACH [UE %d] N_RB_UL %d prach_start %d, prach_len %d
, rx_offset %d, hw_timing_advance %d, N_TA_offset %d
\n
"
,
Mod_id
,
LOG_I
(
PHY
,
"PRACH [UE %d] N_RB_UL %d prach_start %d, prach_len %d
\n
"
,
Mod_id
,
fp
->
N_RB_UL
,
prach_start
,
prach_len
,
ue
->
rx_offset
,
ue
->
hw_timing_advance
,
ue
->
N_TA_offset
);
prach_len
);
#endif
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
int
j
,
overflow
=
prach_start
+
prach_len
-
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_subframe
;
#ifdef NR_PRACH_DEBUG
LOG_I
(
PHY
,
"PRACH [UE %d] overflow = %d
\n
"
,
Mod_id
,
overflow
);
#endif
// prach_start=414.730, overflow=-39470 prach_len=6600 fp->samples_per_subframe*NR_NUMBER_OF_SUBFRAMES_PER_FRAME 460.800 prach_start+prach_len 421.330 fp->samples_per_subframe 46080
// from prach_start=414.730 to prach_start+prach_len 421.330
for
(
i
=
prach_start
,
j
=
0
;
i
<
min
(
fp
->
samples_per_subframe
*
NR_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
];
}
for
(
i
=
0
;
i
<
overflow
;
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
];
}
#else // simulators
for
(
i
=
0
;
i
<
prach_len
;
i
++
)
{
((
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
prach_start
]))[
2
*
i
]
=
prach
[
2
*
i
];
((
int16_t
*
)(
&
ue
->
common_vars
.
txdata
[
0
][
prach_start
]))[
2
*
i
+
1
]
=
prach
[
2
*
i
+
1
];
}
#endif
//printf("----------------------\n");
//for(int ii = prach_start; ii<2*(prach_start + prach_len); ii++){
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
b0903e20
...
...
@@ -434,22 +434,12 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
int
tx_offset
,
ap
;
int32_t
**
txdata
;
int32_t
**
txdataF
;
int
timing_advance
;
uint8_t
Nl
=
UE
->
ulsch
[
thread_id
][
gNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
pusch_pdu
.
nrOfLayers
;
// cw 0
/////////////////////////IFFT///////////////////////
///////////
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
timing_advance
=
UE
->
timing_advance
;
#else
timing_advance
=
0
;
#endif
tx_offset
=
frame_parms
->
get_samples_slot_timestamp
(
slot
,
frame_parms
,
0
)
-
timing_advance
;
if
(
tx_offset
<
0
)
tx_offset
+=
frame_parms
->
samples_per_frame
;
tx_offset
=
frame_parms
->
get_samples_slot_timestamp
(
slot
,
frame_parms
,
0
);
// clear the transmit data array for the current subframe
/*for (int aa=0; aa<UE->frame_parms.nb_antennas_tx; aa++) {
...
...
@@ -461,51 +451,21 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
txdata
=
UE
->
common_vars
.
txdata
;
txdataF
=
UE
->
common_vars
.
txdataF
;
if
(
UE
->
N_TA_offset
>
tx_offset
)
{
int32_t
*
tmp_idft_out
=
(
int32_t
*
)
malloc16
(
frame_parms
->
get_samples_per_slot
(
slot
,
frame_parms
)
*
sizeof
(
int32_t
));
for
(
ap
=
0
;
ap
<
Nl
;
ap
++
)
{
if
(
frame_parms
->
Ncp
==
1
)
{
// extended cyclic prefix
PHY_ofdm_mod
(
txdataF
[
ap
],
tmp_idft_out
,
frame_parms
->
ofdm_symbol_size
,
12
,
frame_parms
->
nb_prefix_samples
,
CYCLIC_PREFIX
);
}
else
{
// normal cyclic prefix
nr_normal_prefix_mod
(
txdataF
[
ap
],
tmp_idft_out
,
14
,
frame_parms
);
}
memcpy
((
void
*
)
&
txdata
[
ap
][
frame_parms
->
samples_per_frame
-
UE
->
N_TA_offset
+
tx_offset
],
(
void
*
)
tmp_idft_out
,
(
UE
->
N_TA_offset
-
tx_offset
)
*
sizeof
(
int32_t
));
memcpy
((
void
*
)
&
txdata
[
ap
][
0
],
(
void
*
)
&
tmp_idft_out
[
UE
->
N_TA_offset
-
tx_offset
],
(
frame_parms
->
get_samples_per_slot
(
slot
,
frame_parms
)
-
UE
->
N_TA_offset
+
tx_offset
)
*
sizeof
(
int32_t
));
}
free
(
tmp_idft_out
);
}
else
{
// UE->N_TA_offset <= tx_offset
for
(
ap
=
0
;
ap
<
Nl
;
ap
++
)
{
if
(
frame_parms
->
Ncp
==
1
)
{
// extended cyclic prefix
PHY_ofdm_mod
(
txdataF
[
ap
],
&
txdata
[
ap
][
tx_offset
-
UE
->
N_TA
_offset
],
&
txdata
[
ap
][
tx
_offset
],
frame_parms
->
ofdm_symbol_size
,
12
,
frame_parms
->
nb_prefix_samples
,
CYCLIC_PREFIX
);
}
else
{
// normal cyclic prefix
nr_normal_prefix_mod
(
txdataF
[
ap
],
&
txdata
[
ap
][
tx_offset
-
UE
->
N_TA
_offset
],
&
txdata
[
ap
][
tx
_offset
],
14
,
frame_parms
);
}
}
}
///////////
////////////////////////////////////////////////////
...
...
openair1/PHY/defs_nr_UE.h
View file @
b0903e20
...
...
@@ -1022,7 +1022,6 @@ typedef struct {
/// Timing Advance updates variables
/// Timing advance update computed from the TA command signalled from gNB
int
timing_advance
;
int
hw_timing_advance
;
int
N_TA_offset
;
///timing offset used in TDD
NR_UL_TIME_ALIGNMENT_t
ul_time_alignment
[
NUMBER_OF_CONNECTED_gNB_MAX
];
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
b0903e20
...
...
@@ -603,7 +603,7 @@ int main(int argc, char **argv){
/* tx_lev_dB not used later, no need to set */
//tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
prach_start
=
subframe
*
frame_parms
->
samples_per_subframe
-
UE
->
N_TA_offset
;
prach_start
=
subframe
*
frame_parms
->
samples_per_subframe
;
#ifdef NR_PRACH_DEBUG
LOG_M
(
"txsig0.m"
,
"txs0"
,
&
txdata
[
0
][
subframe
*
frame_parms
->
samples_per_subframe
],
frame_parms
->
samples_per_subframe
,
1
,
1
);
...
...
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