Commit ebb86d43 authored by Rakesh's avatar Rakesh

Merge branch 'nr_fapi_for_push' of...

Merge branch 'nr_fapi_for_push' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr_fapi_for_push
parents da524268 952ca255
......@@ -44,7 +44,7 @@ pipeline {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO"])
gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO", "Test-TDD-Band78-gNB-NR-UE"])
ansiColor('xterm')
}
......@@ -615,6 +615,25 @@ pipeline {
}
}
}
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
steps {
script {
triggerSlaveJob ('gNB-nrUE-MONO-TDD-Band78-N300', 'Test-TDD-Band78-gNB-NR-UE')
}
}
post {
always {
script {
finalizeSlaveJob('gNB-nrUE-MONO-TDD-Band78-N300')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
}
post {
always {
......
......@@ -54,6 +54,10 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def doEpcLogCollection = true
pipeline {
agent {
label pythonExecutor
......@@ -61,7 +65,7 @@ pipeline {
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: [[resource: ciSmartPhoneResource]], resource: ciSmartPhoneResource)
lock(extra: [[resource: oaiUEResource]], resource: ciSmartPhoneResource)
}
stages {
......@@ -139,6 +143,11 @@ pipeline {
if (params.EPC_IPAddress == null) {
allParametersPresent = false
} else {
if (params.EPC_IPAddress == "none") {
doEpcLogCollection = false
echo "No EPC collections (ping/iperf/hss/mme/spgw)"
}
}
if (params.EPC_Type == null) {
allParametersPresent = false
......@@ -167,8 +176,8 @@ pipeline {
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
currentBuild.result = 'ABORTED'
error('Stopping early because some parameters are missing')
}
}
}
......@@ -299,6 +308,9 @@ pipeline {
}
}
stage('Log Collection (Ping)') {
when {
expression {doEpcLogCollection}
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......@@ -317,6 +329,9 @@ pipeline {
}
}
stage('Log Collection (Iperf)') {
when {
expression {doEpcLogCollection}
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......@@ -335,6 +350,9 @@ pipeline {
}
}
stage('Log Collection (SPGW)') {
when {
expression {doEpcLogCollection}
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......@@ -353,6 +371,9 @@ pipeline {
}
}
stage('Log Collection (MME)') {
when {
expression {doEpcLogCollection}
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......@@ -371,6 +392,9 @@ pipeline {
}
}
stage('Log Collection (HSS)') {
when {
expression {doEpcLogCollection}
}
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......
......@@ -103,6 +103,7 @@ function build_on_vm {
echo "############################################################"
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
echo "git config --global https.postBuffer 123289600" >> $VM_CMDS
if [[ "$VM_NAME" == *"-cppcheck"* ]]
then
if [ $DAEMON -eq 0 ]
......
......@@ -978,6 +978,12 @@ class SSHConnection():
if fullSyncStatus and gotSyncStatus and self.air_interface == 'lte':
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
if result is None:
self.command('ifconfig oaitun_ue1', '\$', 4)
result = re.search('inet addr', str(self.ssh.before))
if result is not None:
logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
tunnelInterfaceStatus = True
else:
self.command('ifconfig oaitun_ue1', '\$', 4)
result = re.search('inet addr', str(self.ssh.before))
if result is not None:
......@@ -1807,7 +1813,6 @@ class SSHConnection():
else:
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
self.command('cd cmake_targets', '\$', 5)
ping_time = re.findall("-c (\d+)",str(self.ping_args))
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
# TIMEOUT CASE
......
......@@ -348,10 +348,11 @@ fi
VM_TEMPLATE=ci-
# look for default ASN1 release in cmake directives
# look for ASN1 release in cmake directives
# It will be the release used when building
ASN1VEROPT=( `grep "add_list2_option(RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
ASN1VER=${ASN1VEROPT[1]//\"}
ASN1VEROPT=( `grep "set (RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
ASN1VER=${ASN1VEROPT[2]//\"}
ASN1VER=${ASN1VER//)}
unset ASN1VEROPT
# variable to identify and store the command (build, create ...)
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-10-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040102
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-20-tm1</htmlTabRef>
<htmlTabName>Test-20MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -21,8 +21,8 @@
-->
<testCaseList>
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
<htmlTabRef>run-oai-gnb-nr-ue</htmlTabRef>
<htmlTabName>Run-gNB-and-NR-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
......
......@@ -21,8 +21,8 @@
-->
<testCaseList>
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
<htmlTabRef>terminate-oai-gnb-nr-ue</htmlTabRef>
<htmlTabName>Terminate-gNB-and-NR-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
090108 090109
......
......@@ -285,34 +285,10 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
# RRC
######
add_list2_option(RRC_ASN1_VERSION "Rel15" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
make_version(LTE_RRC_VERSION 8 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
make_version(LTE_RRC_VERSION 10 2 0)
add_definitions(-DCBA)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
make_version(LTE_RRC_VERSION 10 2 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
make_version(LTE_RRC_VERSION 11 18 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
make_version(LTE_RRC_VERSION 12 16 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
make_version(LTE_RRC_VERSION 13 9 1)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
make_version(LTE_RRC_VERSION 14 7 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
make_version(LTE_RRC_VERSION 15 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
set (RRC_ASN1_VERSION "Rel15")
make_version(LTE_RRC_VERSION 15 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
......@@ -339,12 +315,9 @@ include_directories ("${RRC_FULL_DIR}")
#NR RRC
#######
add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface")
if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
make_version(NR_RRC_VERSION 15 6 0)
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
set (NR_RRC_ASN1_VERSION "NR_Rel15" )
make_version(NR_RRC_VERSION 15 6 0)
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
......@@ -373,34 +346,12 @@ include_directories ("${NR_RRC_FULL_DIR}")
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(S1AP_RELEASE R15 "S1AP ASN.1 grammar version" R8 R9 R10 R14 R15)
set (S1AP_RELEASE R15)
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
if (${S1AP_RELEASE} STREQUAL "R8")
make_version(S1AP_VERSION 8 10 0)
set(S1AP_ASN_FILES "s1ap-8.10.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R9")
make_version(S1AP_VERSION 9 10 0)
set(S1AP_ASN_FILES "s1ap-9.10.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R10")
make_version(S1AP_VERSION 10 9 0)
set(S1AP_ASN_FILES "s1ap-10.9.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R11")
make_version(S1AP_VERSION 11 8 0)
set(S1AP_ASN_FILES "s1ap-11.8.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R12")
make_version(S1AP_VERSION 12 7 0)
set(S1AP_ASN_FILES "s1ap-12.7.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R13")
make_version(S1AP_VERSION 13 6 0)
set(S1AP_ASN_FILES "s1ap-13.6.0.asn1")
elseif (${S1AP_RELEASE} STREQUAL "R14")
make_version(S1AP_VERSION 14 9 0)
set(S1AP_ASN_FILES "s1ap-14.9.0.asn1")
else (${S1AP_RELEASE} STREQUAL "R15")
make_version(S1AP_VERSION 15 6 0)
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
endif(${S1AP_RELEASE} STREQUAL "R8")
make_version(S1AP_VERSION 15 6 0)
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
......@@ -448,25 +399,12 @@ add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(X2AP_RELEASE R15 "X2AP ASN.1 grammar version" R8 R11 R12 R14 R15)
set (X2AP_RELEASE R15)
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
if (${X2AP_RELEASE} STREQUAL "R8")
make_version(X2AP_VERSION 8 9 0)
set(X2AP_ASN_FILES x2ap-8.9.0.asn1)
elseif (${X2AP_RELEASE} STREQUAL "R11")
make_version(X2AP_VERSION 11 9 0)
set(X2AP_ASN_FILES x2ap-11.9.0.asn1)
elseif (${X2AP_RELEASE} STREQUAL "R12")
make_version(X2AP_VERSION 12 9 0)
set(X2AP_ASN_FILES x2ap-12.9.0.asn1)
elseif (${X2AP_RELEASE} STREQUAL "R14")
make_version(X2AP_VERSION 14 7 0)
set(X2AP_ASN_FILES x2ap-14.7.0.asn1)
elseif (${X2AP_RELEASE} STREQUAL "R15")
make_version(X2AP_VERSION 15 6 0)
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
endif(${X2AP_RELEASE} STREQUAL "R8")
make_version(X2AP_VERSION 15 6 0)
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
......
......@@ -47,7 +47,6 @@ VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="False" #Only valid when low-latency flag is set to False
REL="Rel15"
NR_REL="NR_Rel15"
HW="None"
TP="None"
EPC=0
......@@ -107,10 +106,6 @@ Options
Makes test program for haw latency tests
-a | --agent
Enables agent for software-defined control of the eNB
-r | --3gpp-release
default is Rel14,
Rel8 limits the implementation to 3GPP Release 8 version
Rel10 limits the implementation to 3GPP Release 10 version
-w | --hardware
EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, None (Default)
Adds this RF board support (in external packages installation and in compilation)
......@@ -236,10 +231,6 @@ function main() {
--UE-gen-nvram)
gen_nvram_path=$(readlink -f $2)
shift 2;;
-r | --3gpp-release)
REL=$2
echo_info "Setting release to: $REL"
shift 2;;
-w | --hardware)
# Use OAI_USRP as the key word USRP is used inside UHD driver
case "$2" in
......@@ -551,8 +542,6 @@ function main() {
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( NR_RRC_ASN1_VERSION \"${NR_REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
......
......@@ -11,5 +11,14 @@ if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then
rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
mkdir -p "$GENERATED_FULL_DIR"
asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u
if [ "$ASN1C_PREFIX" = "X2AP_" ] ; then
sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
fi
if [ "$ASN1C_PREFIX" = "S1AP_" ] ; then
sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
fi
fi
touch $done_flag
......@@ -643,6 +643,10 @@ inline static uint32_t vcd_get_write_index(void)
return write_index;
}
#if defined(ENABLE_ITTI)
int signal_mask(void);
#endif
void *vcd_dumper_thread_rt(void *args)
{
vcd_queue_user_data_t *data;
......
......@@ -193,7 +193,6 @@ static inline int rxtx(PHY_VARS_gNB *gNB,int frame_rx, int slot_rx, int frame_tx
// UE-specific RX processing for subframe n
if (nfapi_mode == 0 || nfapi_mode == 1) */
pthread_mutex_lock(&gNB->UL_INFO_mutex);
gNB->UL_INFO.frame = frame_rx;
gNB->UL_INFO.slot = slot_rx;
......@@ -665,11 +664,7 @@ static void* gNB_thread_prach( void* param ) {
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
LOG_D(PHY,"Running gNB prach procedures\n");
prach_procedures(gNB
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
);
prach_procedures(gNB ,0);
if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
}
......
......@@ -731,10 +731,18 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
int i;
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
T_INT(0), T_BUFFER(&ru->common.txdata[0][slot * fp->samples_per_slot], fp->samples_per_slot * 4));
nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
int sf_extension = 0;
nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
if ((slot == 0) ||
(slot == 1)) {
int siglen=fp->samples_per_slot;
int flags;
if (slot==0)
flags = 2;
else if (slot==1)
flags=3;
int siglen=fp->samples_per_slot,flags=1;
/*
if (SF_type == SF_S) {
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
......@@ -774,6 +782,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
}
}
......@@ -852,10 +861,7 @@ static void *ru_thread_prach( void *param ) {
/*if (ru->gNB_list[0]){
prach_procedures(
ru->gNB_list[0]
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
ru->gNB_list[0],0
);
}
else {
......@@ -865,10 +871,7 @@ static void *ru_thread_prach( void *param ) {
NULL,
NULL,
proc->frame_prach,
0
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
0,0
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 ); */
......@@ -2048,7 +2051,7 @@ void set_function_spec_param(RU_t *ru) {
case REMOTE_IF5: // the remote unit is IF5 RRU
ru->do_prach = 0;
ru->feprx = nr_fep_full; // this is frequency-shift + DFTs
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // this is frequency-shift + DFTs
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
......
......@@ -63,7 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
//#include "PHY/TOOLS/time_meas.h"
......@@ -513,17 +512,7 @@ static void get_options(void) {
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
if (strlen(in_path) > 0) {
opt_type = OPT_PCAP;
opt_enabled=1;
printf("Enabling OPT for PCAP with the following file %s \n",in_path);
}
if (strlen(in_ip) > 0) {
opt_enabled=1;
opt_type = OPT_WIRESHARK;
printf("Enabling OPT for wireshark for local interface");
}
config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
......@@ -923,10 +912,8 @@ int main( int argc, char **argv )
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
#endif
if (opt_type != OPT_NONE) {
if (init_opt() == -1)
LOG_E(OPT,"failed to run OPT \n");
}
init_opt();
#ifdef PDCP_USE_NETLINK
netlink_init();
......@@ -1158,8 +1145,6 @@ int main( int argc, char **argv )
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
}
if (opt_enabled == 1)
terminate_opt();
logClean();
printf("Bye.\n");
......
......@@ -34,8 +34,6 @@
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)},\
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
......@@ -699,7 +699,7 @@ void *UE_thread(void *arg) {
slot_nr*UE->frame_parms.samples_per_slot];
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + 4)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
int readBlockSize, writeBlockSize;
......@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
AssertFatal( writeBlockSize ==
UE->rfdevice.trx_write_func(&UE->rfdevice,
timestamp+
(4*UE->frame_parms.samples_per_slot) -
(DURATION_RX_TO_TX*UE->frame_parms.samples_per_slot) -
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
openair0_cfg[0].tx_sample_advance,
txp,
......
......@@ -409,18 +409,6 @@ static void get_options(void) {
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
if (strlen(in_path) > 0) {
opt_type = OPT_PCAP;
opt_enabled=1;
printf("Enabling OPT for PCAP with the following file %s \n",in_path);
}
if (strlen(in_ip) > 0) {
opt_enabled=1;
opt_type = OPT_WIRESHARK;
printf("Enabling OPT for wireshark for local interface");
}
config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) {
......@@ -703,10 +691,7 @@ int main( int argc, char **argv ) {
cpuf=get_cpu_freq_GHz();
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
if (opt_type != OPT_NONE) {
if (init_opt() == -1)
LOG_E(OPT,"failed to run OPT \n");
}
init_opt() ;
if (ouput_vcd) {
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
......
......@@ -74,8 +74,6 @@
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
......@@ -27,15 +27,6 @@
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "nfapi_interface.h"
//#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
//#include "RadioResourceConfigDedicated.h"
//#include "TDD-Config.h"
//#include "MBSFN-SubframeConfigList.h"
//#include "MobilityControlInfo.h"
//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
//#include "SCellToAddMod-r10.h"
//#endif
/*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
void phy_config_mib_eNB_NB_IoT(int Mod_id,
......@@ -62,12 +53,12 @@ void phy_config_mib_eNB_NB_IoT(int Mod_id,
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
extra_phyConfig_t* extra_phy_parms);
nfapi_uplink_reference_signal_config_t *ul_nrs_config,
extra_phyConfig_t *extra_phy_parms);
void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
rnti_t rnti,
extra_phyConfig_t* extra_phy_parms);
extra_phyConfig_t *extra_phy_parms);
// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar);
......
This diff is collapsed.
This diff is collapsed.
......@@ -165,20 +165,16 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
}
lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
lte_gold_mbsfn_khz_1dot25(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table,fp->Nid_cell_mbsfn);
#endif
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
uint8_t eNB_id,
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig){
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig) {
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
if (nonMBSFN_SubframeConfig != NULL) {
fp->NonMBSFN_config_flag = 0;
fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
......@@ -186,7 +182,7 @@ void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
fp->NonMBSFN_config.non_mbsfn_SubframeConfig=(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
}
}
#endif
/*
......@@ -310,20 +306,19 @@ void phy_config_meas_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8
memcpy((void *)phy_meas->adj_cell_id,(void *)adj_cell_id,n_adj_cells*sizeof(unsigned int));
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id) {
}
#endif
void phy_config_harq_ue(module_id_t Mod_id,
int CC_id,
uint8_t eNB_id,
uint16_t max_harq_tx)
{
uint16_t max_harq_tx) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx;
}
......@@ -500,18 +495,6 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
}
}
}
#ifdef CBA
if (physicalConfigDedicated->pusch_CBAConfigDedicated_vlola) {
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->betaOffset_CBA_Index;
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->cShift_CBA;
LOG_D(PHY,"[UE %d ] physicalConfigDedicated pusch CBA config dedicated: beta offset %d cshift %d \n",Mod_id,
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index,
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift);
}
#endif
} else {
LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
return;
......
......@@ -25,8 +25,7 @@
uint16_t dl_S_table_normal[10]= {3,9,10,11,12,3,9,10,11,6};
uint16_t dl_S_table_extended[10]= {3,8,9,10,3,8,9,5,0,0};
void set_S_config(LTE_DL_FRAME_PARMS *fp)
{
void set_S_config(LTE_DL_FRAME_PARMS *fp) {
int X = fp->srsX;
fp->ul_symbols_in_S_subframe=(1+X);
......@@ -37,8 +36,7 @@ void set_S_config(LTE_DL_FRAME_PARMS *fp)
}
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t osf)
{
uint8_t osf) {
uint8_t log2_osf;
LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
......@@ -128,12 +126,10 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
frame_parms->nb_prefix_samples0>>=(2-log2_osf);
frame_parms->N_RBGS = 2;
frame_parms->N_RBG = 13;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
frame_parms->ofdm_symbol_size_khz_1dot25 = 6144*osf;
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800; //4344
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
#endif
break;
case 15:
......@@ -170,8 +166,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
}
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
{
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms) {
LOG_I(PHY,"frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
LOG_I(PHY,"frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
LOG_I(PHY,"frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
......
......@@ -507,6 +507,26 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
exit(-1);
}
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
// [hna] added here for RT implementation
uint8_t harq_pid = 0;
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
// --------- setting rel15_ul parameters ----------
rel15_ul->rnti = 0x1234;
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
rel15_ul->ulsch_pdu_rel15.nb_re_dmrs = 6;
rel15_ul->ulsch_pdu_rel15.length_dmrs = 1;
rel15_ul->ulsch_pdu_rel15.Qm = 2;
rel15_ul->ulsch_pdu_rel15.mcs = 9;
rel15_ul->ulsch_pdu_rel15.rv = 0;
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
}
}
......
This diff is collapsed.
......@@ -79,6 +79,32 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_f
return symbol;
}
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot)
{
uint8_t n_hf;
int rel_slot;
n_hf = cfg->sch_config.half_frame_index.value;
// if SSB periodicity is 5ms, they are transmitted in both half frames
if ( cfg->sch_config.ssb_periodicity.value == 5) {
if (slot<10)
n_hf=0;
else
n_hf=1;
}
// to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be
rel_slot = (n_hf)? (slot-10) : slot;
if(rel_slot<10 && rel_slot>=0)
return 1;
else
return 0;
}
int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
int mu,
......
......@@ -34,12 +34,9 @@
#include "LTE_PHICH-Config.h"
#include "LTE_MBSFN-SubframeConfigList.h"
#include "LTE_MobilityControlInfo.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "LTE_SCellToAddMod-r10.h"
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
/** @addtogroup _PHY_STRUCTURES_
* @{
*/
......@@ -359,7 +356,6 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint32_t perfect_ce);
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
......@@ -370,7 +366,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id);
#endif
......@@ -383,7 +378,8 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_frame_index);
int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot);
int nr_init_frame_parms(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int N_RB_DL,int n_ssb_crb,int ssb_subcarrier_offset);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag);
void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
......
......@@ -131,41 +131,30 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
return(0);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
short amp,
int subframe)
{
int subframe) {
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0,a;
int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a;
((short *)&qpsk[0])[1] = a;
((short *)&qpsk[1])[0] = -a;
((short *)&qpsk[1])[1] = a;
((short *)&qpsk[2])[0] = a;
((short *)&qpsk[2])[1] = -a;
((short *)&qpsk[3])[0] = -a;
((short *)&qpsk[3])[1] = -a;
mprime = 3*(110 - eNB->frame_parms.N_RB_DL);
for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
{
for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
k = 6*m;
else
k = 6*m + 3;
k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
......@@ -173,6 +162,7 @@ int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
k++; // skip DC carrier
k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
}
output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
mprime++;
}
......@@ -183,15 +173,11 @@ int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
int *output,
int subframe)
{
int subframe) {
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0;
unsigned int qpsk[4];
// This includes complex conjugate for channel estimation
((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[1])[0] = -ONE_OVER_SQRT2_Q15;
......@@ -200,23 +186,18 @@ int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
((short *)&qpsk[2])[1] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
mprime = 3*(110 - ue->frame_parms.N_RB_DL);
for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
{ mprime_dword = mprime>>4;
for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(ue->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
mprime++;
k++;
}
return(0);
}
#endif // MAKE Rel14
......@@ -44,15 +44,12 @@
#include "lte_refsig.h"
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn)
{
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn) {
unsigned char sfn,l;
unsigned int n,x1,x2;//,x1tmp,x2tmp;
for (sfn=0; sfn<10; sfn++) {
for (l=0; l<3; l++) {
if (l==0)
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit
else
......@@ -61,26 +58,21 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
//n = 0
// printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
// Initializing the Sequence
x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
// skip first 50 double words (1600 bits)
// printf("n=0 : x1 %x, x2 %x\n",x1,x2);
for (n=1; n<50; n++) {
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);
// printf("x1 : %x, x2 : %x\n",x1,x2);
}
for (n=0; n<42; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
......@@ -88,15 +80,11 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
lte_gold_mbsfn_table[sfn][l][n] = x1^x2;
// printf("n=%d : c %x\n",n,x1^x2);
}
}
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn){
void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn) {
unsigned char sfn;
unsigned int n,x1,x2;//,x1tmp,x2tmp;
......@@ -104,12 +92,14 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
for (n=1; n<50; n++) {
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);
}
for (n=0; n<150; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
......@@ -119,16 +109,12 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
}
}
}
#endif
#ifdef LTE_GOLD_MAIN
main()
{
main() {
lte_gold_mbsfn(423,0);
}
#endif
This diff is collapsed.
......@@ -48,18 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int G,
uint8_t q,
uint16_t frame,
uint8_t Ns)
{
uint8_t Ns) {
int n;
// uint8_t reset;
uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4;
uint16_t j0,j,idelta;
......@@ -69,21 +64,27 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
#else
uint16_t i0 = dlsch->i0;
#endif
#ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1;
#else
if (dlsch->sib1_br_flag==1) Nacc=1;
#endif
else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#ifdef PHY_TX_THREAD
// Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1;
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#else
// Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->CEmode == CEmodeA) Nacc=1;
else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#endif
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
......@@ -91,44 +92,38 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
j0 = (i0+idelta)/Nacc;
j = (i - i0)/Nacc;
#endif
// reset = 1;
// x1 is set in lte_gold_generic
if (mbsfn_flag == 0) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
#else
if (dlsch->i0 != 0xFFFF) {
#endif
// rule for BL/CE UEs from Section 6.3.1 in 36.211
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2);
}
else
#endif
} else
x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
} else {
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH
}
#ifdef DEBUG_SCRAMBLING
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
#else
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
#endif
#endif
s = lte_gold_generic(&x1, &x2, 1);
for (n=0; n<(1+(G>>5)); n++) {
#ifdef DEBUG_SCRAMBLING
for (int k=0;k<32;k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
#endif
for (int k=0; k<32; k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
#endif
e[0] = (e[0]) ^ (s&1);
e[1] = (e[1]) ^ ((s>>1)&1);
e[2] = (e[2]) ^ ((s>>2)&1);
......@@ -161,30 +156,24 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
e[29] = (e[29]) ^ ((s>>29)&1);
e[30] = (e[30]) ^ ((s>>30)&1);
e[31] = (e[31]) ^ ((s>>31)&1);
// This is not faster for some unknown reason
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
// ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
s = lte_gold_generic(&x1, &x2, 0);
e += 32;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
}
void init_scrambling_lut(void) {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
for (s=0; s<=65535; s++) {
for (j=0; j<16; j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1);
}
}
......@@ -194,11 +183,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag,
LTE_UE_DLSCH_t *dlsch,
int G,
int16_t* llr,
int16_t *llr,
uint8_t q,
uint8_t Ns)
{
uint8_t Ns) {
int i,j,k=0;
// uint8_t reset;
uint32_t x1, x2, s=0;
......@@ -232,12 +219,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
void init_unscrambling_lut(void) {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
for (s=0; s<=65535; s++) {
for (j=0; j<16; j++) {
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -34,33 +34,25 @@
#include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
unsigned char get_Qm(unsigned char I_MCS)
{
unsigned char get_Qm(unsigned char I_MCS) {
if (I_MCS < 10)
return(2);
else if (I_MCS < 17)
return(4);
else
return(6);
}
unsigned char get_Qm_ul(unsigned char I_MCS)
{
unsigned char get_Qm_ul(unsigned char I_MCS) {
if (I_MCS < 11)
return(2);
else if (I_MCS < 21)
return(4);
else
return(6);
}
unsigned char get_I_TBS(unsigned char I_MCS)
{
unsigned char get_I_TBS(unsigned char I_MCS) {
if (I_MCS < 10)
return(I_MCS);
else if (I_MCS == 10)
......@@ -70,12 +62,9 @@ unsigned char get_I_TBS(unsigned char I_MCS)
else if (I_MCS == 17)
return(15);
else return(I_MCS-2);
}
unsigned char get_I_TBS_UL(unsigned char I_MCS)
{
unsigned char get_I_TBS_UL(unsigned char I_MCS) {
if (I_MCS <= 10)
return(I_MCS);
else if (I_MCS == 10)
......@@ -83,11 +72,9 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS)
else if (I_MCS < 21)
return(I_MCS-1);
else return(I_MCS-2);
}
unsigned char I_TBS2I_MCS(unsigned char I_TBS)
{
unsigned char I_TBS2I_MCS(unsigned char I_TBS) {
unsigned char I_MCS = -1;
///note: change from <= to < to go from choosing higher modulation rather than high code-rate
......@@ -107,9 +94,7 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
return I_MCS;
}
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
{
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) {
uint32_t TBS;
if ((nb_rb > 0) && (mcs < 29)) {
......@@ -121,9 +106,7 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
}
}
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
{
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) {
uint32_t TBS = 0;
if ((nb_rb > 0) && (mcs < 29)) {
......@@ -136,12 +119,9 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
}
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol)
{
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol) {
int rb,re_pbch_sss=0;
int rb_alloc_ind,nsymb;
nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
// printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
......@@ -178,11 +158,9 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
}
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<=((frame_parms->N_RB_DL>>1)+3);
rb++) {
if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64)
......@@ -206,7 +184,6 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<((frame_parms->N_RB_DL>>1)+3);
rb++) {
if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64)
......@@ -228,22 +205,17 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
return(re_pbch_sss);
}
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe)
{
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe) {
int rb,re_pbch_sss=0;
uint8_t rb_alloc_ind;
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS/PSS or SSS/PSS
return(0);
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<=((frame_parms->N_RB_DL>>1)+3);
rb++) {
if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64)
......@@ -305,7 +277,6 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
//SISO so PBCH 3+(5/6) symbols, PSS+SSS 2symbols REs => (35/6)*re_pbch_sss for normal CP,
// 2+10/6 symbols, SSS+PSS 2 symbols => (34/6)*re_pbch_sss for ext. CP
return((-frame_parms->Ncp+35)*re_pbch_sss * mod_order/6);
}
} else if (subframe == 5) // SSS+PSS for FDD, SSS for TDD
return(((frame_parms->frame_type==FDD)?2:1)*re_pbch_sss * 1 * mod_order);
......@@ -315,8 +286,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
return(0);
}
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
{
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
int G_adj;
if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
......@@ -349,11 +319,9 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
{
//int G_adj;
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
//int G_adj;
/*if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe);
......@@ -384,15 +352,14 @@ int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb
}*/
return((int)frame_parms->N_RB_DL * mod_order * 120);
}
#endif
// following function requires dlsch_tbs_full.h
#include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
unsigned char SE2I_TBS(float SE,
unsigned char N_PRB,
unsigned char symbPerRB)
{
unsigned char symbPerRB) {
unsigned char I_TBS= -1;
int throughPutGoal = 0;
short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
......@@ -427,9 +394,7 @@ unsigned char SE2I_TBS(float SE,
//added for ALU icic purpose
uint8_t Get_SB_size(uint8_t n_rb_dl)
{
uint8_t Get_SB_size(uint8_t n_rb_dl) {
if(n_rb_dl<27)
return 4;
else if(n_rb_dl<64)
......
......@@ -35,11 +35,13 @@
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms){
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
uint32_t period;
if(frame_parms->NonMBSFN_config_flag ) {
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
switch (subframe) {
case 0:
......@@ -48,65 +50,82 @@ int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *fra
}
}
}
return (0);
}
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
{
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
uint32_t period;
if(frame_parms->NonMBSFN_config_flag ) {
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
switch (subframe) {
case 1:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
return(1);
break;
case 2:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
return(1);
break;
case 3:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
return(1);
break;
case 4:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
return(1);
break;
case 5:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
return(1);
break;
case 6:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
return(1);
break;
case 7:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
return(1);
break;
case 8:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
return(1);
break;
case 9:
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
return(1);
break;
}
} else { //Then regular MBSFN FeMBMS subframe
return(1);
}
}
return(0);
}
#endif
int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
{
int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
uint32_t period;
uint8_t i;
uint8_t j;
......@@ -121,7 +140,6 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) {
if (frame_parms->frame_type == FDD) {
switch (subframe) {
case 1:
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF1) > 0)
return(1);
......@@ -192,10 +210,8 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
}
}
}
} else { // handle 4 frames case
for(j=0;j<4;j++) {
for(j=0; j<4; j++) {
if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
if (frame_parms->frame_type == FDD) {
switch (subframe) {
......
......@@ -39,10 +39,6 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "prach_extern.h"
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
#define rx_prach0 rx_prach
#endif
void rx_prach0(PHY_VARS_eNB *eNB,
RU_t *ru,
uint16_t *max_preamble,
......@@ -50,11 +46,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t *max_preamble_delay,
uint16_t *avg_preamble_energy,
uint16_t Nf,
uint8_t tdd_mapindex
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag,
uint8_t tdd_mapindex,
uint8_t br_flag,
uint8_t ce_level
#endif
) {
int i;
LTE_DL_FRAME_PARMS *fp=NULL;
......@@ -93,9 +87,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
int32_t *prach_ifft=(int32_t *)NULL;
int32_t **prach_ifftp=(int32_t **)NULL;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int prach_ifft_cnt=0;
#endif
if(eNB) {
fp = &(eNB->frame_parms);
nb_rx = fp->nb_antennas_rx;
......@@ -103,12 +96,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
fp = (ru->frame_parms);
nb_rx = ru->nb_rx;
}
AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
frame_type = fp->frame_type;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
"emtc prach_Config is not enabled\n");
......@@ -125,9 +116,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
max_preamble += ce_level;
max_preamble_energy += ce_level;
max_preamble_delay += ce_level;
} else
#endif
{
} else {
rootSequenceIndex = fp->prach_config_common.rootSequenceIndex;
prach_ConfigIndex = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
Ncs_config = fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig;
......@@ -142,36 +131,33 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t N_ZC = (prach_fmt <4)?839:139;
if (eNB) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
subframe = eNB->proc.subframe_prach_br;
prachF = eNB->prach_vars_br.prachF;
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
if (LOG_DEBUGFLAG(PRACH)){
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
if (LOG_DEBUGFLAG(PRACH)) {
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,
"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
br_flag,ce_level,eNB->proc.frame_prach,subframe,
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
prach_ConfigIndex,rootSequenceIndex,
eNB->prach_vars_br.repetition_number[ce_level],
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
}
} else
#endif
{
} else {
prach_ifftp = eNB->prach_vars.prach_ifft[0];
subframe = eNB->proc.subframe_prach;
prachF = eNB->prach_vars.prachF;
rxsigF = eNB->prach_vars.rxsigF[0];
if (LOG_DEBUGFLAG(PRACH)){
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
if (LOG_DEBUGFLAG(PRACH)) {
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
}
}
} else {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
subframe = ru->proc.subframe_prach_br;
rxsigF = ru->prach_rxsigF_br[ce_level];
......@@ -180,9 +166,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
}
} else
#endif
{
} else {
subframe = ru->proc.subframe_prach;
rxsigF = ru->prach_rxsigF;
......@@ -422,11 +406,11 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if ((eNB==NULL) && ru->function == NGFI_RRU_IF4p5) {
/// **** send_IF4 of rxsigF to RAU **** ///
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
if (br_flag == 1)
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
else
#endif
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
return;
} else if (eNB!=NULL) {
if ( LOG_DEBUGFLAG(PRACH)) {
......@@ -443,7 +427,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint8_t update_TA2 = 1;
switch (eNB->frame_parms.N_RB_DL) {
case 6:
update_TA = 16;
break;
......@@ -460,10 +443,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
update_TA = 3;
update_TA2 = 2;
break;
case 100:
update_TA = 1;
break;
}
*max_preamble_energy=0;
......@@ -568,16 +551,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (new_dft == 1) {
new_dft = 0;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
Xu=(int16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
prach_ifft = prach_ifftp[prach_ifft_cnt++];
if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
} else
#endif
{
} else {
Xu=(int16_t *)eNB->X_u[preamble_offset-first_nonzero_root_idx];
prach_ifft = prach_ifftp[0];
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
......@@ -632,13 +612,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} // new dft
// check energy in nth time shift, for
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if ((br_flag==0) ||
(eNB->prach_vars_br.repetition_number[ce_level]==
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
#endif
{
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) {
if (LOG_DEBUGFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
......@@ -670,7 +646,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} ///ncs2
}
}// preamble_index
*avg_preamble_energy=dB_fixed(avg_en/64);
if (LOG_DUMPFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
......@@ -703,7 +681,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (eNB) stop_meas(&eNB->rx_prach);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void rx_prach(PHY_VARS_eNB *eNB,
RU_t *ru,
......@@ -739,10 +716,9 @@ void rx_prach(PHY_VARS_eNB *eNB,
eNB->prach_vars_br.repetition_number[i]=0;
}
}
}
}
} /* for i ... */
} /* else br_flag == 0 */
}
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
......@@ -326,11 +326,8 @@ uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
};
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
{
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
FILE *fd;
fd = fopen("prach_config.txt","w");
fprintf(fd,"prach_config: subframe = %d\n",subframe);
fprintf(fd,"prach_config: N_RB_UL = %d\n",frame_parms->N_RB_UL);
......@@ -344,13 +341,10 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
fprintf(fd,"prach_config: highSpeedFlag = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag);
fprintf(fd,"prach_config: n_ra_prboffset = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset);
fclose(fd);
}
// This function computes the du
void fill_du(uint8_t prach_fmt)
{
void fill_du(uint8_t prach_fmt) {
uint16_t iu,u,p;
uint16_t N_ZC;
uint16_t *prach_root_sequence_map;
......@@ -364,7 +358,6 @@ void fill_du(uint8_t prach_fmt)
}
for (iu=0; iu<(N_ZC-1); iu++) {
u=prach_root_sequence_map[iu];
p=1;
......@@ -373,27 +366,21 @@ void fill_du(uint8_t prach_fmt)
du[u] = ((p<(N_ZC>>1)) ? p : (N_ZC-p));
}
}
uint8_t get_num_prach_tdd(module_id_t Mod_id)
{
uint8_t get_num_prach_tdd(module_id_t Mod_id) {
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].num_prach);
}
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index)
{
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) {
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra);
}
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
{
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) {
if (frame_type == FDD) // FDD
return(prach_ConfigIndex>>4);
else {
if (prach_ConfigIndex < 20)
return (0);
......@@ -414,18 +401,15 @@ uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t prach_ConfigIndex,
uint8_t n_ra_prboffset,
uint8_t tdd_mapindex, uint16_t Nf)
{
uint8_t tdd_mapindex, uint16_t Nf) {
lte_frame_type_t frame_type = frame_parms->frame_type;
uint8_t tdd_config = frame_parms->tdd_config;
uint8_t n_ra_prb;
uint8_t f_ra,t1_ra;
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
uint8_t Nsp=2;
if (frame_type == TDD) { // TDD
if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) {
LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex);
return(-1);
......@@ -452,21 +436,19 @@ uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
n_ra_prb = frame_parms->N_RB_UL - 6*(f_ra+1);
}
}
}
else { //FDD
} else { //FDD
n_ra_prb = n_ra_prboffset;
}
return(n_ra_prb);
}
int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe)
{
int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe) {
// uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
uint8_t tdd_config = frame_parms->tdd_config;
uint8_t t0_ra;
uint8_t t1_ra;
uint8_t t2_ra;
int prach_mask = 0;
if (frame_parms->frame_type == FDD) { //FDD
......@@ -482,48 +464,59 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
case 0:
case 3:
if (subframe==1) prach_mask = 1;
break;
case 1:
case 4:
if (subframe==4) prach_mask = 1;
break;
case 2:
case 5:
if (subframe==7) prach_mask = 1;
break;
case 6:
if ((subframe==1) || (subframe==6)) prach_mask=1;
break;
case 7:
if ((subframe==2) || (subframe==7)) prach_mask=1;
break;
case 8:
if ((subframe==3) || (subframe==8)) prach_mask=1;
break;
case 9:
if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
break;
case 10:
if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
break;
case 11:
if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
break;
case 12:
if ((subframe&1)==0) prach_mask=1;
break;
case 13:
if ((subframe&1)==1) prach_mask=1;
break;
case 14:
......@@ -532,15 +525,14 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
case 15:
if (subframe==9) prach_mask=1;
break;
}
} else { // TDD
AssertFatal(prach_ConfigIndex<64,
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0,
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra;
t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra;
......@@ -566,17 +558,15 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
}
int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t subframe) {
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
int prach_mask = is_prach_subframe0(frame_parms, prach_ConfigIndex, frame, subframe);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (int i=0; i<4; i++) {
if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1)
prach_mask |= (is_prach_subframe0(frame_parms, frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],
frame, subframe) << (i+1));
}
#endif
return(prach_mask);
}
......@@ -586,9 +576,7 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t zeroCorrelationZoneConfig,
uint8_t highSpeedFlag,
lte_frame_type_t frame_type,
uint32_t X_u[64][839])
{
uint32_t X_u[64][839]) {
// Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC)
unsigned int k,inv_u,i,NCS=0,num_preambles;
int N_ZC;
......@@ -597,13 +585,10 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
uint16_t u, preamble_offset;
uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
uint8_t not_found;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN);
#ifdef PRACH_DEBUG
LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %d\n",zeroCorrelationZoneConfig, prach_fmt);
#endif
AssertFatal(prach_fmt<4,
"PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
N_ZC = (prach_fmt < 4) ? 839 : 139;
......@@ -616,37 +601,30 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
prach_root_sequence_map = prach_root_sequence_map4;
}
#ifdef PRACH_DEBUG
LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
#endif
if (highSpeedFlag== 0) {
#ifdef PRACH_DEBUG
LOG_I(PHY,"Low speed prach : NCS_config %d\n",zeroCorrelationZoneConfig);
#endif
AssertFatal(zeroCorrelationZoneConfig<=15,
"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
NCS = NCS_unrestricted[zeroCorrelationZoneConfig];
num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC);
if (NCS>0) num_preambles++;
preamble_offset = 0;
} else {
#ifdef PRACH_DEBUG
LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", zeroCorrelationZoneConfig );
#endif
AssertFatal(zeroCorrelationZoneConfig<=14,
"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
NCS = NCS_restricted[zeroCorrelationZoneConfig];
fill_du(prach_fmt);
num_preambles = 64; // compute ZC sequence for 64 possible roots
// find first non-zero shift root (stored in preamble_offset)
not_found = 1;
......@@ -665,7 +643,6 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
}
u = prach_root_sequence_map[index];
uint16_t n_group_ra = 0;
if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
......@@ -714,28 +691,22 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
}
u = prach_root_sequence_map[index];
inv_u = ZC_inv[u]; // multiplicative inverse of u
// X_u[0] stores the first ZC sequence where the root u has a non-zero number of shifts
// for the unrestricted case X_u[0] is the first root indicated by the rootSequenceIndex
for (k=0; k<N_ZC; k++) {
// 420 is the multiplicative inverse of 2 (required since ru is exp[j 2\pi n])
X_u[i][k] = ((uint32_t*)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
X_u[i][k] = ((uint32_t *)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_OUT);
}
void init_prach_tables(int N_ZC)
{
void init_prach_tables(int N_ZC) {
int i,m;
// Compute the modular multiplicative inverse 'iu' of u s.t. iu*u = 1 mod N_ZC
ZC_inv[0] = 0;
ZC_inv[1] = 1;
......
......@@ -477,7 +477,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
int i=0;
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
......@@ -488,7 +487,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]);
}
#endif
len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000));
len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000));
len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
......
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.
......@@ -169,7 +169,7 @@ int64_t dot_product64(int16_t *x,
#if defined(__x86_64__) || defined(__i386__)
__m128i *x128,*y128,mmtmp1,mmtmp2,mmtmp3,mmcumul,mmcumul_re,mmcumul_im;
__m128i minus_i = _mm_set_epi16(-1,1,-1,1,-1,1,-1,1);
int32_t result;
int64_t result;
x128 = (__m128i*) x;
y128 = (__m128i*) y;
......
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.
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.
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.
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