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
lizhongxiao
OpenXG-RAN
Commits
4a9afa91
Commit
4a9afa91
authored
Jan 28, 2021
by
Bo Zhao
Committed by
Marwan Hammouda
Sep 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding CL option -P to simulate the propagation delay in the RF simulator
parent
97b08440
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
4 deletions
+13
-4
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+3
-0
executables/nr-softmodem.c
executables/nr-softmodem.c
+2
-0
executables/nr-softmodem.h
executables/nr-softmodem.h
+1
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-0
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+1
-0
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+5
-4
No files found.
executables/nr-softmodem-common.h
View file @
4a9afa91
...
...
@@ -110,6 +110,7 @@
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
#define CONFIG_HLP_NOS1 "Disable s1 interface\n"
#define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n"
#define CONFIG_HLP_PROPD "Set propagation delay in the RF simulator (expressed in number of samples)\n"
/*--------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters for LOG utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
...
...
@@ -154,4 +155,6 @@ extern int emulate_rf;
extern
int
numerology
;
extern
int
usrp_tx_thread
;
extern
uint64_t
RFsim_PropDelay
;
//propagation delay in the RF simulator (expressed in number of samples)
#endif
executables/nr-softmodem.c
View file @
4a9afa91
...
...
@@ -568,6 +568,8 @@ void init_pdcp(void) {
}
}
uint64_t
RFsim_PropDelay
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
ru_id
,
CC_id
=
0
;
start_background_system
();
...
...
executables/nr-softmodem.h
View file @
4a9afa91
...
...
@@ -32,6 +32,7 @@
{"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, 0, .iptr=&ldpc_offload_flag, .defstrval=0, TYPE_INT, 0}, \
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \
{"s" , CONFIG_HLP_SNR, 0, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \
{"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \
}
// clang-format on
...
...
executables/nr-uesoftmodem.c
View file @
4a9afa91
...
...
@@ -424,6 +424,7 @@ static void get_channel_model_mode() {
}
int
NB_UE_INST
=
1
;
uint64_t
RFsim_PropDelay
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
set_exe_prio
=
1
;
...
...
executables/nr-uesoftmodem.h
View file @
4a9afa91
...
...
@@ -63,6 +63,7 @@
{"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&(nrUE_params.chest_time), .defintval=0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, .iptr=&(nrUE_params.no_timing_correction), .defintval=0, TYPE_INT, 0}, \
{"SLC", CONFIG_HLP_SLF, 0, .u64ptr=&(sidelink_frequency[0][0]), .defuintval=2600000000,TYPE_UINT64,0}, \
{"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \
}
// clang-format on
...
...
radio/rfsimulator/simulator.c
View file @
4a9afa91
...
...
@@ -54,7 +54,7 @@
#include "rfsimulator.h"
#define PORT 4043 //default TCP port for this simulator
#define CirSize 6144000
// 100ms is enough
#define CirSize 6144000
0 //curently the circular buffer can hold 100 frames
#define sampleToByte(a,b) ((a)*(b)*sizeof(sample_t))
#define byteToSample(a,b) ((a)/(sizeof(sample_t)*(b)))
...
...
@@ -602,6 +602,7 @@ static int startClient(openair0_device *device) {
return
0
;
}
extern
uint64_t
RFsim_PropDelay
;
static
int
rfsimulator_write_internal
(
rfsimulator_state_t
*
t
,
openair0_timestamp
timestamp
,
void
**
samplesVoid
,
int
nsamps
,
int
nbAnt
,
int
flags
,
bool
alreadyLocked
)
{
if
(
!
alreadyLocked
)
pthread_mutex_lock
(
&
Sockmutex
);
...
...
@@ -877,7 +878,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest
a
,
ptr
->
channel_model
,
nsamps
,
t
->
nextRxTstamp
,
t
->
nextRxTstamp
-
RFsim_PropDelay
,
CirSize
);
}
else
{
// no channel modeling
...
...
@@ -893,8 +894,8 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest
//LOG_I(HW, "nbAnt_tx %d\n",nbAnt_tx);
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
//loop over nsamps
for
(
int
a_tx
=
0
;
a_tx
<
nbAnt_tx
;
a_tx
++
)
{
//sum up signals from nbAnt_tx antennas
out
[
i
].
r
+=
(
short
)(
ptr
->
circularBuf
[((
t
->
nextRxTstamp
+
i
)
*
nbAnt_tx
+
a_tx
)
%
CirSize
].
r
*
H_awgn_mimo
[
a
][
a_tx
]);
out
[
i
].
i
+=
(
short
)(
ptr
->
circularBuf
[((
t
->
nextRxTstamp
+
i
)
*
nbAnt_tx
+
a_tx
)
%
CirSize
].
i
*
H_awgn_mimo
[
a
][
a_tx
]);
out
[
i
].
r
+=
(
short
)(
ptr
->
circularBuf
[((
t
->
nextRxTstamp
-
RFsim_PropDelay
+
i
)
*
nbAnt_tx
+
a_tx
)
%
CirSize
].
r
*
H_awgn_mimo
[
a
][
a_tx
]);
out
[
i
].
i
+=
(
short
)(
ptr
->
circularBuf
[((
t
->
nextRxTstamp
-
RFsim_PropDelay
+
i
)
*
nbAnt_tx
+
a_tx
)
%
CirSize
].
i
*
H_awgn_mimo
[
a
][
a_tx
]);
}
// end for a_tx
}
// end for i (number of samps)
}
// end of no channel modeling
...
...
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