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
wangjie
OpenXG-RAN
Commits
9c94e72f
Commit
9c94e72f
authored
Mar 10, 2021
by
frtabu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sim-channels' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into sim-channels
parents
1f0e8266
c9d27540
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
79 deletions
+145
-79
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+7
-26
ci-scripts/buildOnVM.sh
ci-scripts/buildOnVM.sh
+15
-1
ci-scripts/createVM.sh
ci-scripts/createVM.sh
+6
-0
ci-scripts/oai-ci-vm-tool
ci-scripts/oai-ci-vm-tool
+4
-4
ci-scripts/reportBuildLocally.sh
ci-scripts/reportBuildLocally.sh
+52
-48
ci-scripts/waitBuildOnVM.sh
ci-scripts/waitBuildOnVM.sh
+12
-0
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+49
-0
No files found.
ci-scripts/Jenkinsfile-gitlab
View file @
9c94e72f
...
@@ -196,16 +196,6 @@ pipeline {
...
@@ -196,16 +196,6 @@ pipeline {
}
}
}
}
stage
(
"Start VM -- enb-usrp"
)
{
steps
{
lock
(
vmResource
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
}
stage
(
"Start VM -- phy-sim"
)
{
stage
(
"Start VM -- phy-sim"
)
{
steps
{
steps
{
lock
(
vmResource
)
{
lock
(
vmResource
)
{
...
@@ -251,7 +241,7 @@ pipeline {
...
@@ -251,7 +241,7 @@ pipeline {
stage
(
"Analysis with cppcheck"
)
{
stage
(
"Analysis with cppcheck"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Analysis with cppcheck"
)
{
gitlabCommitStatus
(
name:
"Analysis with cppcheck"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
}
}
}
...
@@ -260,7 +250,7 @@ pipeline {
...
@@ -260,7 +250,7 @@ pipeline {
stage
(
"Build basic simulator"
)
{
stage
(
"Build basic simulator"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Build basic-sim"
)
{
gitlabCommitStatus
(
name:
"Build basic-sim"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
...
@@ -269,7 +259,7 @@ pipeline {
...
@@ -269,7 +259,7 @@ pipeline {
stage
(
"Build 5G gNB-USRP"
)
{
stage
(
"Build 5G gNB-USRP"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Build gNB-USRP"
)
{
gitlabCommitStatus
(
name:
"Build gNB-USRP"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
...
@@ -278,25 +268,16 @@ pipeline {
...
@@ -278,25 +268,16 @@ pipeline {
stage
(
"Build 5G NR-UE-USRP"
)
{
stage
(
"Build 5G NR-UE-USRP"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Build nr-UE-USRP"
)
{
gitlabCommitStatus
(
name:
"Build nr-UE-USRP"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
}
}
}
}
stage
(
"Build eNB-USRP"
)
{
steps
{
gitlabCommitStatus
(
name:
"Build eNB-USRP"
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
}
}
}
stage
(
"Build physical simulators"
)
{
stage
(
"Build physical simulators"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Build phy-sim"
)
{
gitlabCommitStatus
(
name:
"Build phy-sim"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
...
@@ -305,7 +286,7 @@ pipeline {
...
@@ -305,7 +286,7 @@ pipeline {
stage
(
"Build eNB-ethernet"
)
{
stage
(
"Build eNB-ethernet"
)
{
steps
{
steps
{
gitlabCommitStatus
(
name:
"Build eNB-ethernet"
)
{
gitlabCommitStatus
(
name:
"Build eNB-ethernet"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
...
@@ -316,7 +297,7 @@ pipeline {
...
@@ -316,7 +297,7 @@ pipeline {
// This is typically the last one to finish.
// This is typically the last one to finish.
lock
(
vmResource
)
{
lock
(
vmResource
)
{
gitlabCommitStatus
(
name:
"Build UE-ethernet"
)
{
gitlabCommitStatus
(
name:
"Build UE-ethernet"
)
{
timeout
(
time:
2
0
,
unit:
'MINUTES'
)
{
timeout
(
time:
3
0
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
...
...
ci-scripts/buildOnVM.sh
View file @
9c94e72f
...
@@ -62,6 +62,12 @@ function build_on_vm {
...
@@ -62,6 +62,12 @@ function build_on_vm {
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
fi
IS_VM_ALIVE
=
`
uvt-kvm list |
grep
-c
$VM_NAME
`
IS_VM_ALIVE
=
`
uvt-kvm list |
grep
-c
$VM_NAME
`
if
[
$IS_VM_ALIVE
-eq
0
]
if
[
$IS_VM_ALIVE
-eq
0
]
...
@@ -208,7 +214,15 @@ function build_on_vm {
...
@@ -208,7 +214,15 @@ function build_on_vm {
echo
"echo
\"
./build_oai -I
$BUILD_OPTIONS
\"
"
>>
$VM_CMDS
echo
"echo
\"
./build_oai -I
$BUILD_OPTIONS
\"
"
>>
$VM_CMDS
echo
"./build_oai -I
$BUILD_OPTIONS
> log/install-build.txt 2>&1"
>>
$VM_CMDS
echo
"./build_oai -I
$BUILD_OPTIONS
> log/install-build.txt 2>&1"
>>
$VM_CMDS
else
else
echo
"echo
\"
./build_oai -I
$BUILD_OPTIONS
\"
> ./my-vm-build.sh"
>>
$VM_CMDS
if
[[
"
$VM_NAME
"
==
*
"-enb-ethernet"
*
]]
then
echo
"echo
\"
sleep 170 && ./build_oai -I
$BUILD_OPTIONS
\"
> ./my-vm-build.sh"
>>
$VM_CMDS
elif
[[
"
$VM_NAME
"
==
*
"-ue-ethernet"
*
]]
then
echo
"echo
\"
sleep 60 && ./build_oai -I
$BUILD_OPTIONS
\"
> ./my-vm-build.sh"
>>
$VM_CMDS
else
echo
"echo
\"
./build_oai -I
$BUILD_OPTIONS
\"
> ./my-vm-build.sh"
>>
$VM_CMDS
fi
echo
"chmod 775 ./my-vm-build.sh "
>>
$VM_CMDS
echo
"chmod 775 ./my-vm-build.sh "
>>
$VM_CMDS
echo
"echo
\"
sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh
\"
"
>>
$VM_CMDS
echo
"echo
\"
sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh
\"
"
>>
$VM_CMDS
echo
"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh"
>>
$VM_CMDS
echo
"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh"
>>
$VM_CMDS
...
...
ci-scripts/createVM.sh
View file @
9c94e72f
...
@@ -87,6 +87,12 @@ function create_vm {
...
@@ -87,6 +87,12 @@ function create_vm {
echo
"VM_CPU =
$VM_CPU
"
echo
"VM_CPU =
$VM_CPU
"
echo
"VM_DISK =
$VM_DISK
GBytes"
echo
"VM_DISK =
$VM_DISK
GBytes"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
fi
echo
"############################################################"
echo
"############################################################"
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"############################################################"
echo
"############################################################"
...
...
ci-scripts/oai-ci-vm-tool
View file @
9c94e72f
...
@@ -213,15 +213,15 @@ function variant__v6__nr_ue_usrp {
...
@@ -213,15 +213,15 @@ function variant__v6__nr_ue_usrp {
function
variant__v7__enb_ethernet
{
function
variant__v7__enb_ethernet
{
VM_MEMORY
=
4096
VM_MEMORY
=
4096
ARCHIVES_LOC
=
enb_eth
ARCHIVES_LOC
=
enb_eth
NB_PATTERN_FILES
=
8
NB_PATTERN_FILES
=
9
BUILD_OPTIONS
=
"--eNB"
BUILD_OPTIONS
=
"--eNB
-w USRP
"
}
}
function
variant__v8__ue_ethernet
{
function
variant__v8__ue_ethernet
{
VM_MEMORY
=
4096
VM_MEMORY
=
4096
ARCHIVES_LOC
=
ue_eth
ARCHIVES_LOC
=
ue_eth
NB_PATTERN_FILES
=
1
2
NB_PATTERN_FILES
=
1
3
BUILD_OPTIONS
=
"--UE"
BUILD_OPTIONS
=
"--UE
-w USRP
"
}
}
function
variant__v10__flexran_rtc
{
function
variant__v10__flexran_rtc
{
...
...
ci-scripts/reportBuildLocally.sh
View file @
9c94e72f
This diff is collapsed.
Click to expand it.
ci-scripts/waitBuildOnVM.sh
View file @
9c94e72f
...
@@ -47,6 +47,12 @@ function wait_on_vm_build {
...
@@ -47,6 +47,12 @@ function wait_on_vm_build {
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
echo
"BUILD_OPTIONS =
$BUILD_OPTIONS
"
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
fi
IS_VM_ALIVE
=
`
uvt-kvm list |
grep
-c
$VM_NAME
`
IS_VM_ALIVE
=
`
uvt-kvm list |
grep
-c
$VM_NAME
`
if
[
$IS_VM_ALIVE
-eq
0
]
if
[
$IS_VM_ALIVE
-eq
0
]
...
@@ -84,6 +90,12 @@ function wait_on_vm_build {
...
@@ -84,6 +90,12 @@ function wait_on_vm_build {
}
}
function
check_on_vm_build
{
function
check_on_vm_build
{
if
[[
"
$VM_NAME
"
==
*
"-enb-usrp"
*
]]
then
echo
"This VM type is no longer supported in the pipeline framework"
return
fi
echo
"############################################################"
echo
"############################################################"
echo
"Creating a tmp folder to store results and artifacts"
echo
"Creating a tmp folder to store results and artifacts"
echo
"############################################################"
echo
"############################################################"
...
...
openair1/SIMULATION/TOOLS/random_channel.c
View file @
9c94e72f
...
@@ -64,6 +64,7 @@ static unsigned int max_chan;
...
@@ -64,6 +64,7 @@ static unsigned int max_chan;
static
channel_desc_t
**
defined_channels
;
static
channel_desc_t
**
defined_channels
;
static
char
modellist_name
[
MAX_OPTNAME_SIZE
]
=
""
;
static
char
modellist_name
[
MAX_OPTNAME_SIZE
]
=
""
;
void
fill_channel_desc
(
channel_desc_t
*
chan_desc
,
void
fill_channel_desc
(
channel_desc_t
*
chan_desc
,
uint8_t
nb_tx
,
uint8_t
nb_tx
,
uint8_t
nb_rx
,
uint8_t
nb_rx
,
...
@@ -2028,6 +2029,54 @@ void init_channelmod(void) {
...
@@ -2028,6 +2029,54 @@ void init_channelmod(void) {
}
}
}
/* init_channelmod */
}
/* init_channelmod */
void
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
double
channel_bandwidth
)
{
paramdef_t
channelmod_params
[]
=
CHANNELMOD_PARAMS_DESC
;
int
numparams
=
sizeof
(
channelmod_params
)
/
sizeof
(
paramdef_t
);
int
ret
=
config_get
(
channelmod_params
,
numparams
,
CHANNELMOD_SECTION
);
AssertFatal
(
ret
>=
0
,
"configuration couldn't be performed"
);
defined_channels
=
calloc
(
max_chan
,
sizeof
(
channel_desc_t
*
));
AssertFatal
(
defined_channels
!=
NULL
,
"couldn't allocate %u channel descriptors
\n
"
,
max_chan
);
paramdef_t
achannel_params
[]
=
CHANNELMOD_MODEL_PARAMS_DESC
;
paramlist_def_t
channel_list
;
memset
(
&
channel_list
,
0
,
sizeof
(
paramlist_def_t
));
strncpy
(
channel_list
.
listname
,
modellist_name
,
MAX_OPTNAME_SIZE
-
1
);
numparams
=
sizeof
(
achannel_params
)
/
sizeof
(
paramdef_t
);
config_getlist
(
&
channel_list
,
achannel_params
,
numparams
,
CHANNELMOD_SECTION
);
AssertFatal
(
channel_list
.
numelt
>
0
,
"List %s.%s not found in config filee
\n
"
,
CHANNELMOD_SECTION
,
CHANNELMOD_MODELLIST_PARANAME
);
int
pindex_NAME
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_NAME_PNAME
);
int
pindex_DT
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_DT_PNAME
);
int
pindex_FF
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_FF_PNAME
);
int
pindex_CO
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_CO_PNAME
);
int
pindex_PL
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_PL_PNAME
);
int
pindex_NP
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_NP_PNAME
);
int
pindex_TYPE
=
config_paramidx_fromname
(
channelmod_params
,
numparams
,
CHANNELMOD_MODEL_TYPE_PNAME
);
for
(
int
i
=
0
;
i
<
channel_list
.
numelt
;
i
++
)
{
int
modid
=
modelid_fromname
(
*
(
channel_list
.
paramarray
[
i
][
pindex_TYPE
].
strptr
)
);
if
(
modid
<
0
)
{
LOG_E
(
OCM
,
"Valid channel model types:
\n
"
);
for
(
int
m
=
0
;
channelmod_names
[
i
].
name
!=
NULL
;
m
++
)
{
printf
(
" %s "
,
map_int_to_str
(
channelmod_names
,
m
));
}
AssertFatal
(
0
,
"
\n
Choose a valid model type
\n
"
);
}
channel_desc_t
*
channeldesc_p
=
new_channel_desc_scm
(
nb_tx
,
nb_rx
,
modid
,
sampling_rate
,
channel_bandwidth
,
*
(
channel_list
.
paramarray
[
i
][
pindex_DT
].
dblptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_FF
].
dblptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_CO
].
iptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_PL
].
dblptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_NP
].
dblptr
)
);
AssertFatal
(
(
channeldesc_p
!=
NULL
),
"Could not allocate channel %s type %s
\n
"
,
*
(
channelmod_params
[
pindex_NAME
].
strptr
),
*
(
channelmod_params
[
pindex_TYPE
].
strptr
));
channeldesc_p
->
model_name
=
strdup
(
*
(
channel_list
.
paramarray
[
i
][
pindex_NAME
].
strptr
));
LOG_I
(
OCM
,
"Model %s type %s allocated from config file, list %s
\n
"
,
*
(
channel_list
.
paramarray
[
i
][
pindex_NAME
].
strptr
),
*
(
channel_list
.
paramarray
[
i
][
pindex_TYPE
].
strptr
),
modellist_name
);
}
/* for loop on channel_list */
}
/* init_channelmod */
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
double
channel_bandwidth
)
{
int
load_channellist
(
uint8_t
nb_tx
,
uint8_t
nb_rx
,
double
sampling_rate
,
double
channel_bandwidth
)
{
paramdef_t
achannel_params
[]
=
CHANNELMOD_MODEL_PARAMS_DESC
;
paramdef_t
achannel_params
[]
=
CHANNELMOD_MODEL_PARAMS_DESC
;
paramlist_def_t
channel_list
;
paramlist_def_t
channel_list
;
...
...
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