Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
2aafa617
Commit
2aafa617
authored
Sep 29, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix multi blocks transport issue in fs6, and simulators related ul issue for rfsim
parent
733d1292
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
25 deletions
+50
-25
executables/main-fs6.c
executables/main-fs6.c
+18
-3
executables/split_headers.h
executables/split_headers.h
+1
-0
executables/transport_split.c
executables/transport_split.c
+10
-5
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+2
-2
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+2
-2
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair1/SCHED_UE/phy_procedures_lte_ue.c
+15
-11
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+2
-2
No files found.
executables/main-fs6.c
View file @
2aafa617
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
#define FS6_BUF_SIZE 100*1000
#define FS6_BUF_SIZE 100*1000
static
UDPsock_t
sockFS6
;
static
UDPsock_t
sockFS6
;
int
sum
(
uint8_t
*
b
,
int
s
)
{
int
sum
=
0
;
for
(
int
i
=
0
;
i
<
s
;
i
++
)
sum
+=
b
[
i
];
return
sum
;
}
void
prach_eNB_tosplit
(
uint8_t
*
bufferZone
,
int
bufSize
,
PHY_VARS_eNB
*
eNB
)
{
void
prach_eNB_tosplit
(
uint8_t
*
bufferZone
,
int
bufSize
,
PHY_VARS_eNB
*
eNB
)
{
fs6_ul_t
*
header
=
(
fs6_ul_t
*
)
commonUDPdata
(
bufferZone
);
fs6_ul_t
*
header
=
(
fs6_ul_t
*
)
commonUDPdata
(
bufferZone
);
...
@@ -647,7 +653,8 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB) {
...
@@ -647,7 +653,8 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB) {
memcpy
(
eNB
->
pusch_vars
[
hULUE
(
bufPtr
)
->
UE_id
]
->
ulsch_power
,
memcpy
(
eNB
->
pusch_vars
[
hULUE
(
bufPtr
)
->
UE_id
]
->
ulsch_power
,
hULUE
(
bufPtr
)
->
ulsch_power
,
hULUE
(
bufPtr
)
->
ulsch_power
,
sizeof
(
int
)
*
2
);
sizeof
(
int
)
*
2
);
LOG_W
(
PHY
,
"Received ulsch data for: rnti:%d, fsf: %d/%d
\n
"
,
ulsch
->
rnti
,
eNB
->
proc
.
frame_rx
,
eNB
->
proc
.
subframe_rx
);
LOG_I
(
PHY
,
"Received ulsch data for: rnti:%d, fsf: %d/%d
\n
"
,
ulsch
->
rnti
,
eNB
->
proc
.
frame_rx
,
eNB
->
proc
.
subframe_rx
);
}
else
if
(
type
==
fs6ULcch
)
{
}
else
if
(
type
==
fs6ULcch
)
{
int
nb_uci
=
hULUEuci
(
bufPtr
)
->
nb_active_ue
;
int
nb_uci
=
hULUEuci
(
bufPtr
)
->
nb_active_ue
;
fs6_ul_uespec_uci_element_t
*
tmp
=
(
fs6_ul_uespec_uci_element_t
*
)(
hULUEuci
(
bufPtr
)
+
1
);
fs6_ul_uespec_uci_element_t
*
tmp
=
(
fs6_ul_uespec_uci_element_t
*
)(
hULUEuci
(
bufPtr
)
+
1
);
...
@@ -715,6 +722,7 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
...
@@ -715,6 +722,7 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
dlsch_harq
->
Nl
=
hDLUE
(
bufPtr
)
->
Nl
;
dlsch_harq
->
Nl
=
hDLUE
(
bufPtr
)
->
Nl
;
dlsch_harq
->
pdsch_start
=
hDLUE
(
bufPtr
)
->
pdsch_start
;
dlsch_harq
->
pdsch_start
=
hDLUE
(
bufPtr
)
->
pdsch_start
;
#ifdef PHY_TX_THREAD
#ifdef PHY_TX_THREAD
dlsch_harq
->
CEmode
=
hDLUE
(
bufPtr
)
->
CEmode
;
dlsch_harq
->
i0
=
hDLUE
(
bufPtr
)
->
i0
;
dlsch_harq
->
i0
=
hDLUE
(
bufPtr
)
->
i0
;
dlsch_harq
->
sib1_br_flag
=
hDLUE
(
bufPtr
)
->
sib1_br_flag
;
dlsch_harq
->
sib1_br_flag
=
hDLUE
(
bufPtr
)
->
sib1_br_flag
;
#else
#else
...
@@ -723,6 +731,8 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
...
@@ -723,6 +731,8 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
#endif
#endif
memcpy
(
dlsch_harq
->
e
,
memcpy
(
dlsch_harq
->
e
,
hDLUE
(
bufPtr
)
+
1
,
hDLUE
(
bufPtr
)
->
dataLen
);
hDLUE
(
bufPtr
)
+
1
,
hDLUE
(
bufPtr
)
->
dataLen
);
LOG_D
(
PHY
,
"received %d bits, in harq id: %di fsf: %d.%d, sum %d
\n
"
,
hDLUE
(
bufPtr
)
->
dataLen
,
hDLUE
(
bufPtr
)
->
harq_pid
,
frame
,
subframe
,
sum
(
dlsch_harq
->
e
,
hDLUE
(
bufPtr
)
->
dataLen
));
}
else
if
(
type
==
fs6UlConfig
)
{
}
else
if
(
type
==
fs6UlConfig
)
{
int
nbUE
=
(((
commonUDP_t
*
)
bufPtr
)
->
contentBytes
-
sizeof
(
fs6_dl_t
))
/
sizeof
(
fs6_dl_ulsched_t
)
;
int
nbUE
=
(((
commonUDP_t
*
)
bufPtr
)
->
contentBytes
-
sizeof
(
fs6_dl_t
))
/
sizeof
(
fs6_dl_ulsched_t
)
;
...
@@ -759,7 +769,8 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
...
@@ -759,7 +769,8 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
ulsch_harq
->
srs_active
=
hTxULUE
(
bufPtr
)
->
srs_active
;
ulsch_harq
->
srs_active
=
hTxULUE
(
bufPtr
)
->
srs_active
;
ulsch_harq
->
TBS
=
hTxULUE
(
bufPtr
)
->
TBS
;
ulsch_harq
->
TBS
=
hTxULUE
(
bufPtr
)
->
TBS
;
ulsch_harq
->
Nsymb_pusch
=
hTxULUE
(
bufPtr
)
->
Nsymb_pusch
;
ulsch_harq
->
Nsymb_pusch
=
hTxULUE
(
bufPtr
)
->
Nsymb_pusch
;
LOG_W
(
PHY
,
"Received request to perform ulsch for: rnti:%d, fsf: %d/%d
\n
"
,
ulsch
->
rnti
,
frame
,
subframe
);
LOG_I
(
PHY
,
"Received request to perform ulsch for: rnti:%d, fsf: %d/%d
\n
"
,
ulsch
->
rnti
,
frame
,
subframe
);
}
}
}
else
if
(
type
==
fs6ULConfigCCH
)
{
}
else
if
(
type
==
fs6ULConfigCCH
)
{
fs6_dl_uespec_ulcch_element_t
*
tmp
=
(
fs6_dl_uespec_ulcch_element_t
*
)(
hTxULcch
(
bufPtr
)
+
1
);
fs6_dl_uespec_ulcch_element_t
*
tmp
=
(
fs6_dl_uespec_ulcch_element_t
*
)(
hTxULcch
(
bufPtr
)
+
1
);
...
@@ -979,6 +990,7 @@ void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_
...
@@ -979,6 +990,7 @@ void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_
hDLUE
(
newUDPheader
)
->
Nl
=
harqData
->
Nl
;
hDLUE
(
newUDPheader
)
->
Nl
=
harqData
->
Nl
;
hDLUE
(
newUDPheader
)
->
pdsch_start
=
harqData
->
pdsch_start
;
hDLUE
(
newUDPheader
)
->
pdsch_start
=
harqData
->
pdsch_start
;
#ifdef PHY_TX_THREAD
#ifdef PHY_TX_THREAD
hDLUE
(
newUDPheader
)
->
CEmode
=
harqData
->
CEmode
;
hDLUE
(
newUDPheader
)
->
i0
=
harqData
->
i0
;
hDLUE
(
newUDPheader
)
->
i0
=
harqData
->
i0
;
hDLUE
(
newUDPheader
)
->
sib1_br_flag
=
harqData
->
sib1_br_flag
;
hDLUE
(
newUDPheader
)
->
sib1_br_flag
=
harqData
->
sib1_br_flag
;
#else
#else
...
@@ -987,8 +999,11 @@ void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_
...
@@ -987,8 +999,11 @@ void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_
#endif
#endif
hDLUE
(
newUDPheader
)
->
dataLen
=
UEdataLen
;
hDLUE
(
newUDPheader
)
->
dataLen
=
UEdataLen
;
memcpy
(
hDLUE
(
newUDPheader
)
+
1
,
harqData
->
e
,
UEdataLen
);
memcpy
(
hDLUE
(
newUDPheader
)
+
1
,
harqData
->
e
,
UEdataLen
);
LOG_D
(
PHY
,
"sending %d bits, in harq id: %di fsf: %d.%d, sum %d
\n
"
,
UEdataLen
,
harq_pid
,
frame
,
subframe
,
sum
(
harqData
->
e
,
UEdataLen
));
//for (int i=0; i < UEdataLen; i++)
//for (int i=0; i < UEdataLen; i++)
//LOG_D(PHY,"buffer e
:%hhx\n"
, ( (uint8_t *)(hDLUE(newUDPheader)+1) )[i]);
//LOG_D(PHY,"buffer e
i[%d]:%hhx\n", i
, ( (uint8_t *)(hDLUE(newUDPheader)+1) )[i]);
}
}
void
appendFs6DLUEcch
(
uint8_t
*
bufferZone
,
PHY_VARS_eNB
*
eNB
,
int
frame
,
int
subframe
)
{
void
appendFs6DLUEcch
(
uint8_t
*
bufferZone
,
PHY_VARS_eNB
*
eNB
,
int
frame
,
int
subframe
)
{
...
...
executables/split_headers.h
View file @
2aafa617
...
@@ -109,6 +109,7 @@ typedef struct {
...
@@ -109,6 +109,7 @@ typedef struct {
uint16_t
rnti
;
uint16_t
rnti
;
int16_t
sqrt_rho_a
;
int16_t
sqrt_rho_a
;
int16_t
sqrt_rho_b
;
int16_t
sqrt_rho_b
;
CEmode_t
CEmode
:
8
;
uint16_t
nb_rb
;
uint16_t
nb_rb
;
uint8_t
Qm
;
uint8_t
Qm
;
int8_t
Nl
;
int8_t
Nl
;
...
...
executables/transport_split.c
View file @
2aafa617
...
@@ -116,9 +116,11 @@ int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t
...
@@ -116,9 +116,11 @@ int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t
rcved
++
;
rcved
++
;
bufferZone
+=
ret
;
bufferZone
+=
ret
;
}
}
LOG_D
(
HW
,
"Received: blocks: %d/%d, size %d, TS: %lu
\n
"
,
rcved
,
bufOrigin
->
nbBlocks
,
ret
,
bufOrigin
->
timestamp
);
}
while
(
rcved
==
0
||
rcved
<
bufOrigin
->
nbBlocks
);
}
while
(
rcved
==
0
||
rcved
<
bufOrigin
->
nbBlocks
);
LOG_D
(
HW
,
"Received: nb_blocks: %d, TS: %lu
\n
"
,
rcved
,
bufOrigin
->
timestamp
);
return
rcved
;
return
rcved
;
}
}
...
@@ -136,8 +138,10 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui
...
@@ -136,8 +138,10 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui
do
{
do
{
if
(
blockId
>
0
)
{
if
(
blockId
>
0
)
{
commonUDP_t
*
currentHeader
=
(
commonUDP_t
*
)
bufferZone
;
commonUDP_t
*
currentHeader
=
(
commonUDP_t
*
)
bufferZone
;
*
currentHeader
=*
UDPheader
;
currentHeader
->
timestamp
=
UDPheader
->
timestamp
;
currentHeader
->
nbBlocks
=
UDPheader
->
nbBlocks
;
currentHeader
->
blockID
=
blockId
;
currentHeader
->
blockID
=
blockId
;
currentHeader
->
contentType
=
UDPheader
->
contentType
;
memcpy
(
commonUDPdata
((
void
*
)
currentHeader
),
commonUDPdata
(
bufferZone
),
secondHeaderSize
);
memcpy
(
commonUDPdata
((
void
*
)
currentHeader
),
commonUDPdata
(
bufferZone
),
secondHeaderSize
);
}
}
...
@@ -151,11 +155,12 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui
...
@@ -151,11 +155,12 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui
LOG_W
(
HW
,
"Wrote socket doesn't return size %d (val: %d, errno:%d, %s)
\n
"
,
LOG_W
(
HW
,
"Wrote socket doesn't return size %d (val: %d, errno:%d, %s)
\n
"
,
sz
,
ret
,
errno
,
strerror
(
errno
));
sz
,
ret
,
errno
,
strerror
(
errno
));
LOG_D
(
HW
,
"Sent: TS: %lu, blocks %d/%d, block size : %d
\n
"
,
UDPheader
->
timestamp
,
UDPheader
->
nbBlocks
-
nbBlocks
,
UDPheader
->
nbBlocks
,
sz
);
bufferZone
+=
sz
;
bufferZone
+=
sz
;
nbBlocks
--
;
nbBlocks
--
;
}
while
(
nbBlocks
);
}
while
(
nbBlocks
);
LOG_D
(
HW
,
"Sent: TS: %lu, nb blocks %d, size of first block: %lu
\n
"
,
return
0
;
UDPheader
->
timestamp
,
UDPheader
->
nbBlocks
,
alignedSize
((
void
*
)
UDPheader
));
return
0
;
}
}
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
View file @
2aafa617
...
@@ -590,10 +590,10 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
...
@@ -590,10 +590,10 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]
);
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]
);
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
}
else
{
}
else
{
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
}
}
...
...
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
View file @
2aafa617
...
@@ -80,7 +80,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
...
@@ -80,7 +80,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
int
i
,
prach_len
;
int
i
,
prach_len
;
uint16_t
first_nonzero_root_idx
=
0
;
uint16_t
first_nonzero_root_idx
=
0
;
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
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_tti
-
ue
->
hw_timing_advance
-
ue
->
N_TA_offset
);
#ifdef PRACH_DEBUG
#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
,
LOG_I
(
PHY
,
"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d
\n
"
,
ue
->
Mod_id
,
...
@@ -473,7 +473,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
...
@@ -473,7 +473,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
AssertFatal
(
prach_fmt
<
4
,
AssertFatal
(
prach_fmt
<
4
,
"prach_fmt4 not fully implemented"
);
"prach_fmt4 not fully implemented"
);
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
int
j
;
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_tti
;
LOG_I
(
PHY
,
"prach_start=%d, overflow=%d
\n
"
,
prach_start
,
overflow
);
LOG_I
(
PHY
,
"prach_start=%d, overflow=%d
\n
"
,
prach_start
,
overflow
);
...
...
openair1/SCHED_UE/phy_procedures_lte_ue.c
View file @
2aafa617
...
@@ -166,13 +166,16 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb
...
@@ -166,13 +166,16 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb
int
gain_dB
;
int
gain_dB
;
double
gain_lin
;
double
gain_lin
;
if
(
power_dBm
<=
power_max_dBm
)
if
(
(
power_dBm
<=
power_max_dBm
)
&&
!
IS_SOFTMODEM_RFSIM
)
gain_dB
=
power_dBm
-
power_max_dBm
;
gain_dB
=
power_dBm
-
power_max_dBm
;
else
else
gain_dB
=
0
;
gain_dB
=
0
;
gain_lin
=
pow
(
10
,.
1
*
gain_dB
);
gain_lin
=
pow
(
10
,.
1
*
gain_dB
);
AssertFatal
((
nb_rb
>
0
)
&&
(
nb_rb
<=
N_RB_UL
),
"Illegal nb_rb/N_RB_UL combination (%d/%d)
\n
"
,
nb_rb
,
N_RB_UL
);
AssertFatal
((
nb_rb
>
0
)
&&
(
nb_rb
<=
N_RB_UL
),
"Illegal nb_rb/N_RB_UL combination (%d/%d)
\n
"
,
nb_rb
,
N_RB_UL
);
LOG_D
(
PHY
,
" tx gain: %d = %d * sqrt ( pow(10, 0.1*max(0,%d-%d)) * %d/%d ) (gain lin=%f (dB=%d))
\n
"
,
(
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)),
AMP
,
power_dBm
,
power_max_dBm
,
N_RB_UL
,
nb_rb
,
gain_lin
,
gain_dB
);
return
((
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)));
return
((
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)));
}
}
...
@@ -1099,7 +1102,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
...
@@ -1099,7 +1102,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
IS_SOFTMODEM_BASICSIM
)
{
ulsch_start
=
(
ue
->
rx_offset
+
subframe_tx
*
frame_parms
->
samples_per_tti
-
ulsch_start
=
(
ue
->
rx_offset
+
subframe_tx
*
frame_parms
->
samples_per_tti
-
ue
->
hw_timing_advance
-
ue
->
hw_timing_advance
-
ue
->
timing_advance
-
ue
->
timing_advance
-
...
@@ -1130,7 +1133,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
...
@@ -1130,7 +1133,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
}
}
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
int
*
Buff
=
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
?
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
]
:
dummy_tx_buffer
;
int
*
Buff
=
IS_SOFTMODEM_BASICSIM
?
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
]
:
dummy_tx_buffer
;
if
(
frame_parms
->
Ncp
==
1
)
{
if
(
frame_parms
->
Ncp
==
1
)
{
PHY_ofdm_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][
subframe_tx
*
nsymb
*
frame_parms
->
ofdm_symbol_size
],
PHY_ofdm_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][
subframe_tx
*
nsymb
*
frame_parms
->
ofdm_symbol_size
],
...
@@ -1151,7 +1154,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
...
@@ -1151,7 +1154,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
&
ue
->
frame_parms
);
&
ue
->
frame_parms
);
}
}
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
0
);
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
0
);
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
1
);
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
1
);
}
else
{
}
else
{
...
@@ -1159,7 +1162,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
...
@@ -1159,7 +1162,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
apply_7_5_kHz
(
ue
,
dummy_tx_buffer
,
1
);
apply_7_5_kHz
(
ue
,
dummy_tx_buffer
,
1
);
}
}
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
overflow
=
ulsch_start
-
9
*
frame_parms
->
samples_per_tti
;
overflow
=
ulsch_start
-
9
*
frame_parms
->
samples_per_tti
;
for
(
k
=
ulsch_start
,
l
=
0
;
k
<
cmin
(
frame_parms
->
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
ulsch_start
+
frame_parms
->
samples_per_tti
);
k
++
,
l
++
)
{
for
(
k
=
ulsch_start
,
l
=
0
;
k
<
cmin
(
frame_parms
->
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
ulsch_start
+
frame_parms
->
samples_per_tti
);
k
++
,
l
++
)
{
...
@@ -1259,7 +1262,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
...
@@ -1259,7 +1262,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
ue
->
tx_total_RE
[
subframe_tx
]
=
96
;
ue
->
tx_total_RE
[
subframe_tx
]
=
96
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
ue
->
prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
tx_power_max_dBm
,
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
ue
->
frame_parms
.
N_RB_UL
,
...
@@ -1630,7 +1633,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
...
@@ -1630,7 +1633,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue
->
tx_total_RE
[
subframe_tx
]
=
nb_rb
*
12
;
ue
->
tx_total_RE
[
subframe_tx
]
=
nb_rb
*
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
tx_amp
=
AMP
;
}
else
{
}
else
{
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
...
@@ -1704,7 +1707,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
...
@@ -1704,7 +1707,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
Po_SRS
=
ue
->
tx_power_max_dBm
;
Po_SRS
=
ue
->
tx_power_max_dBm
;
}
}
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
tx_amp
=
AMP
;
}
else
{
}
else
{
if
(
ue
->
mac_enabled
==
1
)
{
if
(
ue
->
mac_enabled
==
1
)
{
...
@@ -1942,7 +1945,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
...
@@ -1942,7 +1945,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
tx_amp
=
AMP
;
}
else
{
}
else
{
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
...
@@ -2023,7 +2026,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
...
@@ -2023,7 +2026,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
tx_amp
=
AMP
;
}
else
{
}
else
{
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
...
@@ -2269,7 +2272,7 @@ void ue_measurement_procedures(
...
@@ -2269,7 +2272,7 @@ void ue_measurement_procedures(
// AGC
// AGC
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_IN
);
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_OUT
);
...
@@ -3325,6 +3328,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
...
@@ -3325,6 +3328,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
pdsch
==
PDSCH
?
1
:
0
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_D
(
PHY
,
"dlsch turbo decode in %d iter
\n
"
,
ret
);
if
(
LOG_DEBUGFLAG
(
UE_TIMING
))
{
if
(
LOG_DEBUGFLAG
(
UE_TIMING
))
{
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
ue
->
current_thread_id
[
subframe_rx
]]);
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
ue
->
current_thread_id
[
subframe_rx
]]);
LOG_I
(
PHY
,
" --> Unscrambling for CW0 %5.3f
\n
"
,
LOG_I
(
PHY
,
" --> Unscrambling for CW0 %5.3f
\n
"
,
...
...
targets/ARCH/rfsimulator/simulator.c
View file @
2aafa617
...
@@ -430,8 +430,8 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
...
@@ -430,8 +430,8 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
i
=
0
;
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
i
=
0
;
}
}
}
}
if
(
abs
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
)
>
50
)
LOG_W
(
HW
,
"gap of: %ld in reception
\n
"
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
LOG_W
(
HW
,
"gap of: %ld in reception
\n
"
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
}
}
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
...
...
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