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
canghaiwuhen
OpenXG-RAN
Commits
4d6e647a
Commit
4d6e647a
authored
Jul 06, 2020
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes pushed also in develop
parent
35bf9363
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
25 deletions
+42
-25
executables/ocp-gnb.c
executables/ocp-gnb.c
+9
-3
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+2
-2
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+3
-3
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+1
-0
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+21
-11
No files found.
executables/ocp-gnb.c
View file @
4d6e647a
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <executables/softmodem-common.h>
#include <executables/softmodem-common.h>
#include <openair2/GNB_APP/gnb_app.h>
#include <openair2/GNB_APP/gnb_app.h>
#include <openair2/RRC/NR/nr_rrc_extern.h>
#include <openair2/RRC/NR/nr_rrc_extern.h>
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto.h>
// should be in a shared lib
// should be in a shared lib
#include <forms.h>
#include <forms.h>
...
@@ -176,11 +177,16 @@ static inline int rxtx(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc) {
...
@@ -176,11 +177,16 @@ static inline int rxtx(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc) {
int
rx_slot_type
=
nr_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
slot_rx
);
int
rx_slot_type
=
nr_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
slot_rx
);
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
// UE-specific RX processing for subframe n
// Do PRACH RU processing
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
int
prach_id
=
find_nr_prach
(
gNB
,
proc
->
frame_rx
,
proc
->
slot_rx
,
0
,
SEARCH_EXIST
);
if
(
prach_id
>=
0
)
{
L1_nr_prach_procedures
(
gNB
,
proc
->
frame_rx
,
proc
->
slot_rx
,
&
gNB
->
prach_vars
.
list
[
prach_id
].
pdu
);
gNB
->
prach_vars
.
list
[
prach_id
].
frame
=-
1
;
}
phy_procedures_gNB_uespec_RX
(
gNB
,
proc
->
frame_rx
,
proc
->
slot_rx
);
phy_procedures_gNB_uespec_RX
(
gNB
,
proc
->
frame_rx
,
proc
->
slot_rx
);
}
}
if
(
oai_exit
)
return
(
-
1
);
if
(
oai_exit
)
return
(
-
1
);
// *****************************************
// *****************************************
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
4d6e647a
...
@@ -146,7 +146,7 @@ void polar_encoder_dci(uint32_t *in,
...
@@ -146,7 +146,7 @@ void polar_encoder_dci(uint32_t *in,
uint16_t
n_RNTI
);
uint16_t
n_RNTI
);
void
polar_encoder_fast
(
uint64_t
*
A
,
void
polar_encoder_fast
(
uint64_t
*
A
,
uint32_t
*
out
,
void
*
out
,
int32_t
crcmask
,
int32_t
crcmask
,
uint8_t
ones_flag
,
uint8_t
ones_flag
,
t_nrPolar_params
*
polarParams
);
t_nrPolar_params
*
polarParams
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
4d6e647a
...
@@ -408,7 +408,7 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
...
@@ -408,7 +408,7 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
}
}
void
polar_encoder_fast
(
uint64_t
*
A
,
void
polar_encoder_fast
(
uint64_t
*
A
,
uint32_t
*
out
,
void
*
out
,
int32_t
crcmask
,
int32_t
crcmask
,
uint8_t
ones_flag
,
uint8_t
ones_flag
,
t_nrPolar_params
*
polarParams
)
{
t_nrPolar_params
*
polarParams
)
{
...
@@ -676,5 +676,5 @@ void polar_encoder_fast(uint64_t *A,
...
@@ -676,5 +676,5 @@ void polar_encoder_fast(uint64_t *A,
}
}
}
}
memset
((
void
*
)
out
,
0
,
polarParams
->
encoderLength
>>
3
);
memset
((
void
*
)
out
,
0
,
polarParams
->
encoderLength
>>
3
);
polar_rate_matching
(
polarParams
,(
void
*
)
D
,
(
void
*
)
out
);
polar_rate_matching
(
polarParams
,(
void
*
)
D
,
out
);
}
}
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
4d6e647a
...
@@ -465,8 +465,8 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -465,8 +465,8 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
dft
(
dftsize
,(
int16_t
*
)
&
rxdata
[
rxdata_offset
-
sample_offset
],
dft
(
dftsize
,(
int16_t
*
)
&
rxdata
[
rxdata_offset
-
sample_offset
],
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
LOG_T
(
PHY
,
"dft of size: %d done from %d (energy %d) to %d offsets (energy (%d)
\n
"
,
LOG_T
(
PHY
,
"
Ns: %d, symbol: %d
dft of size: %d done from %d (energy %d) to %d offsets (energy (%d)
\n
"
,
dftsize
,
Ns
,
symbol
,
dftsize
,
rxdata_offset
-
sample_offset
,
signal_energy
(
&
rxdata
[
rxdata_offset
-
sample_offset
],
dftsize
),
rxdata_offset
-
sample_offset
,
signal_energy
(
&
rxdata
[
rxdata_offset
-
sample_offset
],
dftsize
),
symbol
*
frame_parms
->
ofdm_symbol_size
,
signal_energy
(
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
dftsize
)
symbol
*
frame_parms
->
ofdm_symbol_size
,
signal_energy
(
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
dftsize
)
);
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
4d6e647a
...
@@ -237,7 +237,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
...
@@ -237,7 +237,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
],
0
,
NULL
);
0
,
NULL
);
polar_encoder_fast
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
],
encoder_output
,
n_RNTI
,
1
,
currentPtr
);
polar_encoder_fast
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
],
(
void
*
)
encoder_output
,
n_RNTI
,
1
,
currentPtr
);
#ifdef DEBUG_CHANNEL_CODING
#ifdef DEBUG_CHANNEL_CODING
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
4d6e647a
...
@@ -297,7 +297,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -297,7 +297,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
a_reversed
|=
(((
uint64_t
)
pbch
->
pbch_a_prime
>>
i
)
&
1
)
<<
(
31
-
i
);
a_reversed
|=
(((
uint64_t
)
pbch
->
pbch_a_prime
>>
i
)
&
1
)
<<
(
31
-
i
);
/// CRC, coding and rate matching
/// CRC, coding and rate matching
polar_encoder_fast
(
&
a_reversed
,
(
uint32_t
*
)
pbch
->
pbch_e
,
0
,
0
,
polar_encoder_fast
(
&
a_reversed
,
(
void
*
)
pbch
->
pbch_e
,
0
,
0
,
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
,
0
,
NULL
)
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
,
0
,
NULL
)
);
);
#ifdef DEBUG_PBCH_ENCODING
#ifdef DEBUG_PBCH_ENCODING
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
4d6e647a
...
@@ -962,7 +962,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
...
@@ -962,7 +962,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
uint64_t
b
[
16
];
// limit to 1024-bit encoded length
uint64_t
b
[
16
];
// limit to 1024-bit encoded length
// M_bit is the number of bits of block b (payload after encoding)
// M_bit is the number of bits of block b (payload after encoding)
uint16_t
M_bit
;
uint16_t
M_bit
;
nr_uci_encoding
(
payload
,
nr_bit
,
pucch_format2_nr
,
0
,
nrofSymbols
,
nrofPRB
,
1
,
0
,
0
,
&
b
,
&
M_bit
);
nr_uci_encoding
(
payload
,
nr_bit
,
pucch_format2_nr
,
0
,
nrofSymbols
,
nrofPRB
,
1
,
0
,
0
,
(
void
*
)
b
,
&
M_bit
);
/*
/*
* Implementing TS 38.211
* Implementing TS 38.211
* Subclauses 6.3.2.5.1 Scrambling (PUCCH format 2)
* Subclauses 6.3.2.5.1 Scrambling (PUCCH format 2)
...
@@ -1128,7 +1128,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1128,7 +1128,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
printf
(
"
\t
[nr_generate_pucch3_4] start function at slot(nr_tti_tx)=%d with payload=%lu and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
printf
(
"
\t
[nr_generate_pucch3_4] start function at slot(nr_tti_tx)=%d with payload=%lu and nr_bit=%d
\n
"
,
nr_tti_tx
,
payload
,
nr_bit
);
#endif
#endif
// b is the block of bits transmitted on the physical channel after payload coding
// b is the block of bits transmitted on the physical channel after payload coding
uint64_t
b
;
uint64_t
b
[
16
]
;
// M_bit is the number of bits of block b (payload after encoding)
// M_bit is the number of bits of block b (payload after encoding)
uint16_t
M_bit
;
uint16_t
M_bit
;
// parameter PUCCH-F4-preDFT-OCC-length set of {2,4} -> to use table -1 or -2
// parameter PUCCH-F4-preDFT-OCC-length set of {2,4} -> to use table -1 or -2
...
@@ -1153,7 +1153,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
...
@@ -1153,7 +1153,7 @@ void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue,
//nrofPRB = 2; // only for test purposes
//nrofPRB = 2; // only for test purposes
if
(
fmt
==
pucch_format4_nr
)
nrofPRB
=
1
;
if
(
fmt
==
pucch_format4_nr
)
nrofPRB
=
1
;
nr_uci_encoding
(
payload
,
nr_bit
,
fmt
,
is_pi_over_2_bpsk_enabled
,
nrofSymbols
,
nrofPRB
,
n_SF_PUCCH_s
,
intraSlotFrequencyHopping
,
add_dmrs
,
&
b
,
&
M_bit
);
nr_uci_encoding
(
payload
,
nr_bit
,
fmt
,
is_pi_over_2_bpsk_enabled
,
nrofSymbols
,
nrofPRB
,
n_SF_PUCCH_s
,
intraSlotFrequencyHopping
,
add_dmrs
,
(
void
*
)
b
,
&
M_bit
);
/*
/*
* Implementing TS 38.211
* Implementing TS 38.211
* Subclauses 6.3.2.6.1 Scrambling (PUCCH formats 3 and 4)
* Subclauses 6.3.2.6.1 Scrambling (PUCCH formats 3 and 4)
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
4d6e647a
...
@@ -272,7 +272,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
...
@@ -272,7 +272,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
uint16_t
frame_number_4lsb
=
0
;
uint16_t
frame_number_4lsb
=
0
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
frame_number_4lsb
|=
((
extra_bits
>>
i
)
&
1
)
<<
(
3
-
i
);
frame_number_4lsb
|=
((
extra_bits
>>
i
)
&
1
)
<<
(
3
-
i
);
uint8_t
half_frame_bit
=
(
extra_bits
>>
4
)
&
0x1
;
// extra bits[4]
//
uint8_t half_frame_bit = ( extra_bits >> 4 ) & 0x1; // extra bits[4]
uint8_t
ssb_subcarrier_offset_msb
=
(
extra_bits
>>
5
)
&
0x1
;
// extra bits[5]
uint8_t
ssb_subcarrier_offset_msb
=
(
extra_bits
>>
5
)
&
0x1
;
// extra bits[5]
uint8_t
ssb_subcarrier_offset
=
(
uint8_t
)
mac
->
mib
->
ssb_SubcarrierOffset
;
uint8_t
ssb_subcarrier_offset
=
(
uint8_t
)
mac
->
mib
->
ssb_SubcarrierOffset
;
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
4d6e647a
...
@@ -155,6 +155,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -155,6 +155,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
}
// PDCP_USE_NETLINK
}
// PDCP_USE_NETLINK
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s), nas_sock_fd[0]: %d
\n
"
,
errno
,
strerror
(
errno
),
nas_sock_fd
[
0
]);
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
log_dump
(
PDCP
,
pdcpData
,
min
(
sizeToWrite
,
30
)
,
LOG_DUMP_CHAR
,
log_dump
(
PDCP
,
pdcpData
,
min
(
sizeToWrite
,
30
)
,
LOG_DUMP_CHAR
,
...
...
targets/ARCH/rfsimulator/simulator.c
View file @
4d6e647a
...
@@ -148,11 +148,17 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
...
@@ -148,11 +148,17 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
// while calling new_channel_desc_scm() with path losses = 0
// while calling new_channel_desc_scm() with path losses = 0
static
bool
init_done
=
false
;
static
bool
init_done
=
false
;
if
(
!
init_done
)
{
if
(
!
init_done
)
{
randominit
(
0
);
uint64_t
rand
;
FILE
*
h
=
fopen
(
"/dev/random"
,
"r"
);
fread
(
&
rand
,
sizeof
(
rand
),
1
,
h
);
fclose
(
h
);
randominit
(
rand
);
tableNor
(
0
);
tableNor
(
0
);
init_done
=
true
;
init_done
=
true
;
}
}
ptr
->
channel_model
=
new_channel_desc_scm
(
bridge
->
tx_num_channels
,
bridge
->
rx_num_channels
,
ptr
->
channel_model
=
new_channel_desc_scm
(
bridge
->
tx_num_channels
,
bridge
->
rx_num_channels
,
bridge
->
channelmod
,
bridge
->
channelmod
,
bridge
->
sample_rate
,
bridge
->
sample_rate
,
...
@@ -375,6 +381,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
...
@@ -375,6 +381,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
LOG_E
(
HW
,
"Not supported to send Tx out of order (same in USRP) %lu, %lu
\n
"
,
LOG_E
(
HW
,
"Not supported to send Tx out of order (same in USRP) %lu, %lu
\n
"
,
t
->
lastWroteTS
,
timestamp
);
t
->
lastWroteTS
,
timestamp
);
t
->
lastWroteTS
=
timestamp
+
nsamps
;
t
->
lastWroteTS
=
timestamp
+
nsamps
;
if
(
!
alreadyLocked
)
if
(
!
alreadyLocked
)
...
@@ -476,20 +483,22 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
...
@@ -476,20 +483,22 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
b
->
trashingPacket
=
true
;
b
->
trashingPacket
=
true
;
}
else
if
(
b
->
lastReceivedTS
<
b
->
th
.
timestamp
)
{
}
else
if
(
b
->
lastReceivedTS
<
b
->
th
.
timestamp
)
{
int
nbAnt
=
b
->
th
.
nbAnt
;
int
nbAnt
=
b
->
th
.
nbAnt
;
if
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
<
CirSize
)
{
if
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
<
CirSize
)
{
for
(
uint64_t
index
=
b
->
lastReceivedTS
;
index
<
b
->
th
.
timestamp
;
index
++
)
{
for
(
uint64_t
index
=
b
->
lastReceivedTS
;
index
<
b
->
th
.
timestamp
;
index
++
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
r
=
0
;
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
r
=
0
;
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
i
=
0
;
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
i
=
0
;
}
}
}
}
}
else
{
}
else
{
memset
(
b
->
circularBuf
,
0
,
sampleToByte
(
CirSize
,
1
));
memset
(
b
->
circularBuf
,
0
,
sampleToByte
(
CirSize
,
1
));
}
}
if
(
b
->
lastReceivedTS
!=
0
&&
b
->
th
.
timestamp
-
b
->
lastReceivedTS
>
50
)
if
(
b
->
lastReceivedTS
!=
0
&&
b
->
th
.
timestamp
-
b
->
lastReceivedTS
>
50
)
LOG_W
(
HW
,
"UEsock: %d gap of: %ld in reception
\n
"
,
fd
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
LOG_W
(
HW
,
"UEsock: %d gap of: %ld in reception
\n
"
,
fd
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
}
else
if
(
b
->
lastReceivedTS
>
b
->
th
.
timestamp
&&
b
->
th
.
size
==
1
)
{
}
else
if
(
b
->
lastReceivedTS
>
b
->
th
.
timestamp
&&
b
->
th
.
size
==
1
)
{
LOG_W
(
HW
,
"Received Rx/Tx synchro out of order
\n
"
);
LOG_W
(
HW
,
"Received Rx/Tx synchro out of order
\n
"
);
b
->
trashingPacket
=
true
;
b
->
trashingPacket
=
true
;
...
@@ -649,8 +658,9 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
...
@@ -649,8 +658,9 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
else
{
// no channel modeling
else
{
// no channel modeling
sample_t
*
out
=
(
sample_t
*
)
samplesVoid
[
a
];
sample_t
*
out
=
(
sample_t
*
)
samplesVoid
[
a
];
const
int64_t
base
=
t
->
nextTimestamp
*
nbAnt
+
a
;
const
int64_t
base
=
t
->
nextTimestamp
*
nbAnt
+
a
;
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
const
int
idx
=
(
i
*
nbAnt
+
base
)
%
CirSize
;
const
int
idx
=
(
i
*
nbAnt
+
base
)
%
CirSize
;
out
[
i
].
r
+=
ptr
->
circularBuf
[
idx
].
r
;
out
[
i
].
r
+=
ptr
->
circularBuf
[
idx
].
r
;
out
[
i
].
i
+=
ptr
->
circularBuf
[
idx
].
i
;
out
[
i
].
i
+=
ptr
->
circularBuf
[
idx
].
i
;
}
}
...
@@ -691,7 +701,7 @@ int rfsimulator_set_freq(openair0_device *device, openair0_config_t *openair0_cf
...
@@ -691,7 +701,7 @@ int rfsimulator_set_freq(openair0_device *device, openair0_config_t *openair0_cf
int
rfsimulator_set_gains
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
int
rfsimulator_set_gains
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
return
0
;
return
0
;
}
}
int
rfsimulator_write_init
(
openair0_device
*
device
){
int
rfsimulator_write_init
(
openair0_device
*
device
)
{
return
0
;
return
0
;
}
}
__attribute__
((
__visibility__
(
"default"
)))
__attribute__
((
__visibility__
(
"default"
)))
...
...
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