Commit d45fcd6f authored by Wang Tsu-Han's avatar Wang Tsu-Han

Merge branch 'develop' into parallel-phy-test-EMUFH

Conflicts:
	openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
	openair1/PHY/LTE_UE_TRANSPORT/get_pmi.c
	openair2/LAYER2/MAC/eNB_scheduler_phytest.c
	openair3/S1AP/MESSAGES/ASN1/R8/s1ap-8.10.0.asn1
	targets/RT/USER/lte-enb.c
	targets/RT/USER/lte-ru.c
	targets/RT/USER/rfsim.h
parents aa00a473 e83a7fca
#!/bin/bash
function usage {
echo "OAI Local Build Check script"
echo " Original Author: Raphael Defosseux"
echo ""
echo "Usage:"
echo "------"
echo " buildLocally.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --workspace #### OR -ws ####"
echo " Specify the workspace"
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -ne 2 ] && [ $# -ne 1 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-ws|--workspace)
JENKINS_WKSP="$2"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
cd $JENKINS_WKSP
STATUS=0
############################################################
# Creating a tmp folder to store results and artifacts
############################################################
if [ ! -d $JENKINS_WKSP/archives ]
then
mkdir $JENKINS_WKSP/archives
fi
source oaienv
cd $JENKINS_WKSP/cmake_targets
############################################################
# Building eNb with USRP option
############################################################
ARCHIVES_LOC=$JENKINS_WKSP/archives/enb_usrp
if [ ! -d $ARCHIVES_LOC ]
then
mkdir $ARCHIVES_LOC
fi
./build_oai --eNB -w USRP -c
# Generated log files:
if [ -f $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt ]
then
LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt $ARCHIVES_LOC
else
STATUS=-1
fi
if [ -f $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt ]
then
LOCAL_STAT=`egrep -c "Built target params_libconfig" $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt $ARCHIVES_LOC
else
STATUS=-1
fi
if [ -f $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt ]
then
LOCAL_STAT=`egrep -c "Built target coding" $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt $ARCHIVES_LOC
else
STATUS=-1
fi
if [ -f $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt ]
then
LOCAL_STAT=`egrep -c "Built target oai_usrpdevif" $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt $ARCHIVES_LOC
else
STATUS=-1
fi
############################################################
# Building basic simulator
############################################################
ARCHIVES_LOC=$JENKINS_WKSP/archives/basic_sim
if [ ! -d $ARCHIVES_LOC ]
then
mkdir $ARCHIVES_LOC
fi
cd $JENKINS_WKSP/cmake_targets
./build_oai --basic-simulator -c
# Generated log files:
if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt ]
then
LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt $ARCHIVES_LOC
else
STATUS=-1
fi
if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt ]
then
LOCAL_STAT=`egrep -c "Built target lte-uesoftmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt $ARCHIVES_LOC
else
STATUS=-1
fi
if [ -f $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt ]
then
LOCAL_STAT=`egrep -c "Built target conf2uedata" $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt`
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
cp $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt $ARCHIVES_LOC
else
STATUS=-1
fi
############################################################
# Creating a zip for Jenkins archiving
############################################################
cd $JENKINS_WKSP/archives/
zip -r local_build_logs.zip basic_sim enb_usrp
exit $STATUS
This diff is collapsed.
#!/bin/bash
function usage {
echo "OAI VM Creation script"
echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo " -- xenial image already synced"
echo " Default:"
echo " -- eNB with USRP"
echo ""
echo "Usage:"
echo "------"
echo " createVM.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo " Specify the variant to build."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
function variant_usage {
echo "OAI VM Build Check script"
echo " Original Author: Raphael Defosseux"
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo ""
}
if [ $# -lt 1 ] || [ $# -gt 6 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
VM_TEMPLATE=ci-
JOB_NAME=XX
BUILD_ID=XX
VM_NAME=ci-enb-usrp
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-jn|--job-name)
JOB_NAME="$2"
shift
shift
;;
-id|--build-id)
BUILD_ID="$2"
shift
shift
;;
-v1)
VM_NAME=ci-enb-usrp
shift
;;
-v2)
VM_NAME=ci-basic-sim
shift
;;
-v3)
VM_NAME=ci-phy-sim
shift
;;
-v4)
VM_NAME=ci-cppcheck
shift
;;
-v7)
VM_NAME=ci-enb-ethernet
shift
;;
-v8)
VM_NAME=ci-ue-ethernet
shift
;;
--variant)
variant="$2"
case $variant in
enb-usrp)
VM_NAME=ci-enb-usrp
;;
basic-sim)
VM_NAME=ci-basic-sim
;;
phy-sim)
VM_NAME=ci-phy-sim
;;
cppcheck)
VM_NAME=ci-cppcheck
;;
enb-ethernet)
VM_NAME=ci-enb-ethernet
;;
ue-ethernet)
VM_NAME=ci-ue-ethernet
;;
*)
echo ""
echo "Syntax Error: Invalid Variant option -> $variant"
echo ""
variant_usage
exit 1
esac
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
then
VM_TEMPLATE=ci-
else
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
fi
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
VM_CMDS=${VM_NAME}_cmds.txt
echo "VM_NAME = $VM_NAME"
echo "############################################################"
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
echo "############################################################"
uvt-kvm create $VM_NAME release=xenial --memory 2048 --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml
echo "Waiting for VM to be started"
uvt-kvm wait $VM_NAME --insecure
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
exit 0
#!/bin/bash
function usage {
echo "OAI VM Destroy script"
echo " Original Author: Raphael Defosseux"
echo ""
echo "Usage:"
echo "------"
echo " destroyAllRunningVM.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -gt 4 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
VM_TEMPLATE=ci-
JOB_NAME=XX
BUILD_ID=XX
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-jn|--job-name)
JOB_NAME="$2"
shift
shift
;;
-id|--build-id)
BUILD_ID="$2"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
then
VM_TEMPLATE=ci-
else
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
fi
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
for CI_VM in $LIST_CI_VM
do
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
uvt-kvm destroy $CI_VM
ssh-keygen -R $VM_IP_ADDR
done
exit 0
This diff is collapsed.
#!/bin/bash
function usage {
echo "OAI VM Test Run script"
echo " Original Author: Raphael Defosseux"
echo " Default:"
echo " -- eNB with USRP"
echo ""
echo "Usage:"
echo "------"
echo " runTestOnVM.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
echo " --workspace #### OR -ws ####"
echo " Specify the workspace."
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo " Specify the variant to build."
echo ""
echo " --keep-vm-alive OR -k"
echo " Keep the VM alive after the build."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
function variant_usage {
echo "OAI VM Test Run script"
echo " Original Author: Raphael Defosseux"
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo ""
}
if [ $# -lt 1 ] || [ $# -gt 9 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
VM_TEMPLATE=ci-
JOB_NAME=XX
BUILD_ID=XX
VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp/test
KEEP_VM_ALIVE=0
RUN_OPTIONS="none"
STATUS=0
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-jn|--job-name)
JOB_NAME="$2"
shift
shift
;;
-id|--build-id)
BUILD_ID="$2"
shift
shift
;;
-ws|--workspace)
JENKINS_WKSP="$2"
shift
shift
;;
-k|--keep-vm-alive)
KEEP_VM_ALIVE=1
shift
;;
-v1)
VM_NAME=ci-enb-usrp
shift
;;
-v2)
VM_NAME=ci-basic-sim
shift
;;
-v3)
VM_NAME=ci-phy-sim
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
ARCHIVES_LOC=phy_sim/test
shift
;;
-v4)
VM_NAME=ci-cppcheck
shift
;;
-v7)
VM_NAME=ci-enb-ethernet
shift
;;
-v8)
VM_NAME=ci-ue-ethernet
shift
;;
--variant)
variant="$2"
case $variant in
enb-usrp)
VM_NAME=ci-enb-usrp
;;
basic-sim)
VM_NAME=ci-basic-sim
;;
phy-sim)
VM_NAME=ci-phy-sim
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
ARCHIVES_LOC=phy_sim/test
;;
cppcheck)
VM_NAME=ci-cppcheck
;;
enb-ethernet)
VM_NAME=ci-enb-ethernet
;;
ue-ethernet)
VM_NAME=ci-ue-ethernet
;;
*)
echo ""
echo "Syntax Error: Invalid Variant option -> $variant"
echo ""
variant_usage
exit 1
esac
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
then
VM_TEMPLATE=ci-
else
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
fi
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
VM_CMDS=${VM_NAME}_cmds.txt
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
echo "VM_NAME = $VM_NAME"
echo "VM_CMD_FILE = $VM_CMDS"
echo "JENKINS_WKSP = $JENKINS_WKSP"
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
echo "############################################################"
echo "Waiting for VM to be started"
echo "############################################################"
uvt-kvm wait $VM_NAME --insecure
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
if [ "$RUN_OPTIONS" == "none" ]
then
echo "No run on VM testing for this variant currently"
else
echo "############################################################"
echo "Running test script on VM ($VM_NAME)"
echo "############################################################"
echo "echo \"sudo apt-get --yes --quiet install bc \"" > $VM_CMDS
echo "sudo apt-get update > bc-install.txt 2>&1" >> $VM_CMDS
echo "sudo apt-get --yes install bc >> bc-install.txt 2>&1" >> $VM_CMDS
echo "cd tmp" >> $VM_CMDS
echo "echo \"source oaienv\"" >> $VM_CMDS
echo "source oaienv" >> $VM_CMDS
echo "echo \"cd cmake_targets/autotests\"" >> $VM_CMDS
echo "cd cmake_targets/autotests" >> $VM_CMDS
echo "echo \"rm -Rf log\"" >> $VM_CMDS
echo "rm -Rf log" >> $VM_CMDS
echo "$RUN_OPTIONS" | sed -e 's@"@\\"@g' -e 's@^@echo "@' -e 's@$@"@' >> $VM_CMDS
echo "$RUN_OPTIONS" >> $VM_CMDS
echo "cp /home/ubuntu/bc-install.txt log" >> $VM_CMDS
echo "cd log" >> $VM_CMDS
echo "zip -r -qq tmp.zip *.* 0*" >> $VM_CMDS
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
echo "############################################################"
echo "Creating a tmp folder to store results and artifacts"
echo "############################################################"
if [ -d $ARCHIVES_LOC ]
then
rm -Rf $ARCHIVES_LOC
fi
mkdir --parents $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/autotests/log/tmp.zip $ARCHIVES_LOC
pushd $ARCHIVES_LOC
unzip -qq -DD tmp.zip
rm tmp.zip
if [ -f results_autotests.xml ]
then
FUNCTION=`echo $VM_NAME | sed -e "s@$VM_TEMPLATE@@"`
NEW_NAME=`echo "results_autotests.xml" | sed -e "s@results_autotests@results_autotests-$FUNCTION@"`
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $NEW_NAME
echo "<?xml-stylesheet type=\"text/xsl\" href=\"$FUNCTION.xsl\" ?>" >> $NEW_NAME
cat results_autotests.xml >> $NEW_NAME
sed -e "s@TEMPLATE@$FUNCTION@" $JENKINS_WKSP/ci-scripts/template.xsl > $FUNCTION.xsl
#mv results_autotests.xml $NEW_NAME
rm results_autotests.xml
fi
popd
if [ $KEEP_VM_ALIVE -eq 0 ]
then
echo "############################################################"
echo "Destroying VM"
echo "############################################################"
uvt-kvm destroy $VM_NAME
ssh-keygen -R $VM_IP_ADDR
fi
rm -f $VM_CMDS
echo "############################################################"
echo "Checking build status"
echo "############################################################"
LOG_FILES=`ls $ARCHIVES_LOC/results_autotests*.xml`
NB_FOUND_FILES=0
NB_RUNS=0
NB_FAILURES=0
for FULLFILE in $LOG_FILES
do
TESTSUITES=`egrep "testsuite errors" $FULLFILE`
for TESTSUITE in $TESTSUITES
do
if [[ "$TESTSUITE" == *"tests="* ]]
then
RUNS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
NB_RUNS=$((NB_RUNS + RUNS))
fi
if [[ "$TESTSUITE" == *"failures="* ]]
then
FAILS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
NB_FAILURES=$((NB_FAILURES + FAILS))
fi
done
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
done
echo "NB_FOUND_FILES = $NB_FOUND_FILES"
echo "NB_RUNS = $NB_RUNS"
echo "NB_FAILURES = $NB_FAILURES"
if [ $NB_FOUND_FILES -eq 0 ]; then STATUS=-1; fi
if [ $NB_RUNS -eq 0 ]; then STATUS=-1; fi
if [ $NB_FAILURES -ne 0 ]; then STATUS=-1; fi
if [ $STATUS -eq 0 ]
then
echo "STATUS seems OK"
else
echo "STATUS failed?"
fi
fi
exit $STATUS
<domain type='kvm'>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-passthrough'>
</cpu>
<devices>
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='0'/>
</serial>
<graphics type='vnc' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video/>
</devices>
</domain>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
<!-- main body -->
<xsl:template match="/">
<html>
<body>
<h3>TEMPLATE Results Summary</h3>
<table border="1">
<tr bgcolor="lightcyan">
<!--Header only so select first row to get headers-->
<th>Hostname</th>
<th>Nb Tests</th>
<th>Failures</th>
<th>Timestamp</th>
</tr>
<!--Get all the other rows-->
<xsl:for-each select="testsuites/testsuite">
<tr>
<td>
<xsl:value-of select="@hostname"/>
</td>
<td>
<xsl:value-of select="@tests"/>
</td>
<td>
<xsl:value-of select="@failures"/>
</td>
<td>
<xsl:value-of select="@timestamp"/>
</td>
</tr>
</xsl:for-each>
</table>
<h4>Details</h4>
<table border="1">
<tr bgcolor="lightcyan">
<!--Header only so select first row to get headers-->
<th>Test Name</th>
<th>Result</th>
<th>Time</th>
<th>Description</th>
</tr>
<!--Get all the other rows-->
<xsl:for-each select="testsuites/testsuite/testcase">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@RESULT"/>
</td>
<td>
<xsl:value-of select="@time"/>
</td>
<td>
<xsl:value-of select="@description"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
...@@ -2127,6 +2127,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2127,6 +2127,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
int *); int *);
int P1_SHIFT[13],P2_SHIFT[13]; int P1_SHIFT[13],P2_SHIFT[13];
int offset,nushiftmod3; int offset,nushiftmod3;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PHY/types.h"
/**
\brief Gold Sequence Generation defined in 3x.211
\param x1 x1 shift register
\param x2 x2 shift register / cinit if reset is set
\param reset Reset flag / reinitialize the generator
\return c 32 bits of gold output
*/
extern inline uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset)
{
int32_t n;
// 3GPP 3x.211
// Nc = 1600
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
// x1(n+31) = [x1(n+3) + x1(n)]mod2
// x2(n+31) = [x2(n+3) + x2(n+2) + x2(n+1) + x2(n)]mod2
if (reset)
{
// Init value for x1: x1(0) = 1, x1(n) = 0, n=1,2,...,30
// x1(31) = [x1(3) + x1(0)]mod2 = 1
*x1 = 1 + (1<<31);
// Init value for x2: cinit = sum_{i=0}^30 x2*2^i
// x2(31) = [x2(3) + x2(2) + x2(1) + x2(0)]mod2
// = (*x2>>3) ^ (*x2>>2) + (*x2>>1) + *x2
*x2 = *x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
// x1 and x2 contain bits n = 0,1,...,31
// Nc = 1600 bits are skipped at the beginning
// i.e., 1600 / 32 = 50 32bit words
for (n = 1; n < 50; n++)
{
// Compute x1(0),...,x1(27)
*x1 = (*x1>>1) ^ (*x1>>4);
// Compute x1(28),..,x1(31) and xor
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
// Compute x2(0),...,x2(27)
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
// Compute x2(28),..,x2(31) and xor
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
}
}
*x1 = (*x1>>1) ^ (*x1>>4);
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
return(*x1^*x2);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
uint8_t get_pmi(uint8_t N_RB_DL, MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb)
{
/*
MIMO_mode_t mode = dlsch_harq->mimo_mode;
uint32_t pmi_alloc = dlsch_harq->pmi_alloc;
*/
switch (N_RB_DL) {
case 6: // 1 PRB per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>(rb<<1))&3);
else
return((pmi_alloc>>rb)&1);
break;
default:
case 25: // 4 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>2)<<1))&3);
else
return((pmi_alloc>>(rb>>2))&1);
break;
case 50: // 6 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb/6)<<1))&3);
else
return((pmi_alloc>>(rb/6))&1);
break;
case 100: // 8 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>3)<<1))&3);
else
return((pmi_alloc>>(rb>>3))&1);
break;
}
}
This diff is collapsed.
#include<stdio.h>
#include<math.h>
#include<complex.h>
#include <stdlib.h>
#include "PHY/defs_UE.h"
/* FUNCTIONS FOR LINEAR PREPROCESSING: MMSE, WHITENNING, etc*/
void transpose(int N, float complex *A, float complex *Result);
void conjugate_transpose(int N, float complex *A, float complex *Result);
void H_hermH_plus_sigma2I(int N, int M, float complex *A, float sigma2, float complex *Result);
void HH_herm_plus_sigma2I(int M, int N, float complex *A, float sigma2, float complex *Result);
void eigen_vectors_values(int N, float complex *A, float complex *Vectors, float *Values_Matrix);
void lin_eq_solver(int N, float complex *A, float complex* B);
//float complex* lin_eq_solver (int N, float complex* A, float complex* B);
/* mutl_matrix_matrix_row_based performs multiplications when matrix is row-oriented H[0], H[1]; H[2], H[3]*/
void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result );
/* mutl_matrix_matrix_col_based performs multiplications matrix is column-oriented H[0], H[2]; H[1], H[3]*/
void mutl_matrix_matrix_col_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result );
void compute_MMSE(float complex* H, int order_H, float sigma2, float complex* W_MMSE);
void compute_white_filter(float complex* H, int order_H, float sigma2, float complex* U_1, float complex* D_1);
void mmse_processing_oai(LTE_UE_PDSCH *pdsch_vars,
LTE_DL_FRAME_PARMS *frame_parms,
PHY_MEASUREMENTS *measurements,
unsigned char first_symbol_flag,
MIMO_mode_t mimo_mode,
unsigned short mmse_flag,
int noise_power,
unsigned char symbol,
unsigned short nb_rb);
void precode_channel_est(int32_t **dl_ch_estimates_ext,
LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_PDSCH *pdsch_vars,
unsigned char symbol,
unsigned short nb_rb,
MIMO_mode_t mimo_mode);
void rxdataF_to_float(int32_t **rxdataF_ext,
float complex **rxdataF_f,
int n_rx,
int length,
int start_point);
void chan_est_to_float(int32_t **dl_ch_estimates_ext,
float complex **dl_ch_estimates_ext_f,
int n_tx,
int n_rx,
int length,
int start_point);
void float_to_chan_est(int32_t **dl_ch_estimates_ext,
float complex **dl_ch_estimates_ext_f,
int n_tx,
int n_rx,
int length,
int start_point);
void float_to_rxdataF(int32_t **rxdataF_ext,
float complex **rxdataF_f,
int n_tx,
int n_rx,
int length,
int start_point);
void mult_mmse_rxdataF(float complex** Wmmse,
float complex** rxdataF_ext_f,
int n_tx,
int n_rx,
int length,
int start_point);
void mult_mmse_chan_est(float complex** Wmmse,
float complex** dl_ch_estimates_ext_f,
int n_tx,
int n_rx,
int length,
int start_point);
void mmse_processing_core(int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
int sigma2,
int n_tx,
int n_rx,
int length,
int start_point);
void mmse_processing_core_flp(float complex** rxdataF_ext_flcpx,
float complex **H,
int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
float sigma2,
int n_tx,
int n_rx,
int length,
int start_point);
void whitening_processing_core_flp(float complex** rxdataF_ext_flcpx,
float complex **H,
int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
float sigma2,
int n_tx,
int n_rx,
int length,
int start_point);
float sqrt_float(float x, float sqrt_x);
This diff is collapsed.
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file eNB_scheduler_fairRR.h
* \brief eNB scheduler fair round robin header
* \author Masayuki Harada
* \date 2018
* \email masayuki.harada@jp.fujitsu.com
* \version 1.0
* @ingroup _mac
*/
#ifndef __LAYER2_MAC_ENB_SCHEDULER_FAIRRR_H__
#define __LAYER2_MAC_ENB_SCHEDULER_FAIRRR_H__
/* define */
enum SCH_UE_PRIORITY {
SCH_PRIORITY_NONE,
SCH_DL_SI,
SCH_DL_PAGING,
SCH_DL_MSG2,
SCH_DL_MSG4,
SCH_UL_PRACH,
SCH_UL_MSG3,
SCH_DL_RETRANS,
SCH_UL_RETRANS,
SCH_DL_FIRST,
SCH_UL_FIRST,
SCH_UL_INACTIVE
};
typedef struct {
int UE_id;
enum SCH_UE_PRIORITY ue_priority;
rnti_t rnti;
uint16_t nb_rb;
} DLSCH_UE_INFO;
typedef struct {
uint16_t ue_num;
DLSCH_UE_INFO list[20];
} DLSCH_UE_SELECT;
typedef struct {
int UE_id;
enum SCH_UE_PRIORITY ue_priority;
uint8_t start_rb;
uint8_t nb_rb;
uint16_t ul_total_buffer;
} ULSCH_UE_INFO;
typedef struct {
uint8_t ue_num;
ULSCH_UE_INFO list[20];
} ULSCH_UE_SELECT;
/* proto */
void set_dl_ue_select_msg2(int CC_idP, uint16_t nb_rb, int UE_id, rnti_t rnti);
void set_dl_ue_select_msg4(int CC_idP, uint16_t nb_rb, int UE_id, rnti_t rnti);
void dlsch_scheduler_pre_ue_select_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int* mbsfn_flag,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]);
void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
frame_t frameP,
sub_frame_t subframeP,
int N_RBG[MAX_NUM_CCs],
int *mbsfn_flag);
void fill_DLSCH_dci_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int* mbsfn_flagP);
void schedule_ue_spec_fairRR(module_id_t module_idP,
frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag);
void ulsch_scheduler_pre_ue_select_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
sub_frame_t sched_subframeP,
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
sub_frame_t sched_subframeP,
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
void schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP);
void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
unsigned char sched_subframeP,
ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]);
/* extern */
extern DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs];
extern int last_dlsch_ue_id[MAX_NUM_CCs];
extern int last_ulsch_ue_id[MAX_NUM_CCs];
#endif
...@@ -223,7 +223,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -223,7 +223,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body; nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body;
//mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe; mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
hi_dci0_req->sfn_sf = (frameP << 4) + subframeP; hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
...@@ -302,7 +302,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -302,7 +302,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
hi_dci0_req_body->number_of_dci++; hi_dci0_req_body->number_of_dci++;
ul_req_index = 0; ul_req_index = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "93";
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "3GPP_eNODEB";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 0;
pdsch_referenceSignalPower = -27;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONE";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
ue_multiple_max = 20;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
);
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
# real_time choice in {hard, rt-preempt, no}
real_time = "no";
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "93";
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "NGFI_RCC_IF4p5";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "TDD";
tdd_config = 1;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 38;
downlink_frequency = 2580000000L;
uplink_frequency_offset = 0;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -27;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -104;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_if_name = "lo";
remote_address = "127.0.0.2";
local_address = "127.0.0.1";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "no"
tr_preference = "udp_if4p5"
nb_tx = 2
nb_rx = 2
att_tx = 0
att_rx = 0;
eNB_instances = [0];
is_slave = "no";
}
);
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
RUs = (
{
local_if_name = "lo";
remote_address = "127.0.0.1"
local_address = "127.0.0.2";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
remote_portd = 50001;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -29;
max_rxgain = 120;
bands = [38];
is_slave = "no";
}
);
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
...@@ -1729,7 +1729,6 @@ static void* ru_thread( void* param ) { ...@@ -1729,7 +1729,6 @@ static void* ru_thread( void* param ) {
ru->do_prach, ru->do_prach,
is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx), is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx),
proc->frame_rx,proc->subframe_rx); proc->frame_rx,proc->subframe_rx);
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) { if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
wakeup_prach_ru(ru); wakeup_prach_ru(ru);
} }
......
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __RFSIM__H__
#define __RFSIM__H__
#include "lte-softmodem.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "platform_constants.h"
#include "common/ran_context.h"
#include "PHY/defs_UE.h"
#include "PHY/defs_eNB.h"
void init_ocm(double snr_dB,double sinr_dB);
void update_ocm(double snr_dB,double sinr_dB);
void init_channel_vars(void);
#endif
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Tue Jun 5 12:44:02 2018
[*]
[dumpfile] "/tmp/openair_dump_UE.vcd"
[dumpfile_mtime] "Tue Jun 5 12:38:07 2018"
[dumpfile_size] 21826387
[savefile] "/home/knopp/oai/openairinterface5g/targets/RT/USER/rru_if4p5_simulator.gtkw"
[timestart] 6591570000
[size] 1301 716
[pos] 309 0
*-22.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 312
[signals_width] 262
[sst_expanded] 1
[sst_vpaned_height] 294
@29
functions.UE_trx_read
@28
functions.trx_read
functions.trx_write
@24
variables.trx_write_flags[63:0]
@28
functions.trx_write_if
functions.send_if4
functions.trx_read_if
functions.recv_if4
@24
variables.trx_ts[63:0]
variables.trx_tst[63:0]
variables.frame_number_RX0_RU[63:0]
variables.subframe_number_RX0_RU[63:0]
variables.frame_number_TX0_RU[63:0]
variables.subframe_number_TX0_RU[63:0]
@28
functions.do_DL_sig
functions.do_UL_sig
functions.phy_procedures_ru_feprx0
functions.phy_procedures_ru_feptx_ofdm0
[pattern_trace] 1
[pattern_trace] 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment