Commit cb3108f4 authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'integration_2022_wk35' into 'develop'

integration_2022_wk35

See merge request oai/openairinterface5g!1682

MR !1571 PHY procedures for SRS MIMO
MR !1666 gzip optim, links for size
MR !1668 Update core images to latest develop for CI
MR !1670 Fix initial_cyclic_shift for pucch-ConfigCommon
MR !1671 Fix unaligned channel processing with odd number of rb
MR !1672 Enable 2 Downlink layers MIMO and other minor improvements in default configuration files
MR !1680 Fix buffer overflow and division by 0 for SRS
parents e28fccc7 e2faa154
...@@ -579,9 +579,17 @@ class Containerize(): ...@@ -579,9 +579,17 @@ class Containerize():
lUserName = self.eNB2UserName lUserName = self.eNB2UserName
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.') ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
if ret != 0:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close() lSsh.close()
# Going to the Test Server # Going to the Test Server
...@@ -599,15 +607,26 @@ class Containerize(): ...@@ -599,15 +607,26 @@ class Containerize():
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~') lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
# copyout has no return code and will quit if something fails
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10) lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
logging.debug(lSsh.getBefore())
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close() lSsh.close()
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'): if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz') os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
def DeployObject(self, HTML, EPC): def DeployObject(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0': if self.eNB_serverId[self.eNB_instance] == '0':
...@@ -683,6 +702,9 @@ class Containerize(): ...@@ -683,6 +702,9 @@ class Containerize():
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)') logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)') logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
status = False status = False
if healthyNb == 1: if healthyNb == 1:
cnt = 0 cnt = 0
...@@ -697,11 +719,12 @@ class Containerize(): ...@@ -697,11 +719,12 @@ class Containerize():
status = True status = True
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m') logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
time.sleep(10) time.sleep(10)
else:
# containers are unhealthy, so we won't start. However, logs are stored at the end
# in UndeployObject so we here store the logs of the unhealthy container to report it
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.close() mySSH.close()
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
if status: if status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
else: else:
......
...@@ -253,7 +253,7 @@ class EPCManagement(): ...@@ -253,7 +253,7 @@ class EPCManagement():
logging.debug('Starting OAI CN5G') logging.debug('Starting OAI CN5G')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5) mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5) mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5) mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60) mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
if re.search('start-mini-as-ue', self.cfgDeploy): if re.search('start-mini-as-ue', self.cfgDeploy):
dFile = 'docker-compose-mini-nrf-asue.yaml' dFile = 'docker-compose-mini-nrf-asue.yaml'
...@@ -537,7 +537,7 @@ class EPCManagement(): ...@@ -537,7 +537,7 @@ class EPCManagement():
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5) mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
logging.debug('Terminating OAI CN5G') logging.debug('Terminating OAI CN5G')
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5) mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60) mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
mySSH.command('docker volume prune --force || true', '\$', 60) mySSH.command('docker volume prune --force || true', '\$', 60)
time.sleep(2) time.sleep(2)
......
...@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Build_Proxy': elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML) CONTAINERS.BuildProxy(HTML)
elif action == 'Copy_Image_to_Test': elif action == 'Copy_Image_to_Test':
CONTAINERS.Copy_Image_to_Test_Server(HTML) success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
if not success:
RAN.prematureExit = True
elif action == 'Deploy_Object': elif action == 'Deploy_Object':
CONTAINERS.DeployObject(HTML, EPC) CONTAINERS.DeployObject(HTML, EPC)
if CONTAINERS.exitStatus==1: if CONTAINERS.exitStatus==1:
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "l2sim-oai-nrf" container_name: "l2sim-oai-nrf"
image: oai-nrf:latest image: oai-nrf:august-dev
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - NRF_INTERFACE_PORT_FOR_SBI=80
...@@ -42,7 +42,7 @@ services: ...@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "l2sim-oai-amf" container_name: "l2sim-oai-amf"
image: oai-amf:latest image: oai-amf:august-dev
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0 - INSTANCE=0
...@@ -110,7 +110,7 @@ services: ...@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "l2sim-oai-smf" container_name: "l2sim-oai-smf"
image: oai-smf:latest image: oai-smf:august-dev
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0 - INSTANCE=0
...@@ -156,7 +156,7 @@ services: ...@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "l2sim-oai-spgwu" container_name: "l2sim-oai-spgwu"
image: oai-spgwu-tiny:latest image: oai-spgwu-tiny:august-dev
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run - PID_DIRECTORY=/var/run
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:latest image: oai-nrf:august-dev
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - NRF_INTERFACE_PORT_FOR_SBI=80
...@@ -42,7 +42,7 @@ services: ...@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:latest image: oai-amf:august-dev
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0 - INSTANCE=0
...@@ -110,7 +110,7 @@ services: ...@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:latest image: oai-smf:august-dev
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0 - INSTANCE=0
...@@ -156,7 +156,7 @@ services: ...@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:latest image: oai-spgwu-tiny:august-dev
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run - PID_DIRECTORY=/var/run
......
...@@ -237,8 +237,9 @@ compilations() { ...@@ -237,8 +237,9 @@ compilations() {
echo_error "$2 compilation failed" echo_error "$2 compilation failed"
exit 1 exit 1
fi fi
if [ -s $3 ] ; then if [ -s "$3" ] ; then
cp $3 $4 rm -f "$4"
ln -s "$PWD/$3" "$4"
echo_success "$2 compiled" echo_success "$2 compiled"
check_warnings "$dlog/$2.$REL.txt" check_warnings "$dlog/$2.$REL.txt"
else else
......
...@@ -43,6 +43,7 @@ RUN yum update -y && \ ...@@ -43,6 +43,7 @@ RUN yum update -y && \
tzdata \ tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -53,6 +53,7 @@ RUN apt-get update && \ ...@@ -53,6 +53,7 @@ RUN apt-get update && \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \ iperf \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \ ...@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
tzdata \ tzdata \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -52,6 +52,7 @@ RUN apt-get update && \ ...@@ -52,6 +52,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iproute2 \ iproute2 \
iputils-ping \ iputils-ping \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -41,6 +41,7 @@ RUN yum update -y && \ ...@@ -41,6 +41,7 @@ RUN yum update -y && \
tzdata \ tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -47,6 +47,7 @@ RUN apt-get update && \ ...@@ -47,6 +47,7 @@ RUN apt-get update && \
libatlas3-base \ libatlas3-base \
libconfig9 \ libconfig9 \
net-tools \ net-tools \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -44,6 +44,7 @@ RUN yum update -y && \ ...@@ -44,6 +44,7 @@ RUN yum update -y && \
nettle \ nettle \
tzdata \ tzdata \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
iproute \ iproute \
......
...@@ -46,6 +46,7 @@ RUN yum update -y && \ ...@@ -46,6 +46,7 @@ RUN yum update -y && \
iputils \ iputils \
iproute \ iproute \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
libXpm \ libXpm \
......
...@@ -50,6 +50,7 @@ RUN apt-get update && \ ...@@ -50,6 +50,7 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do ...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting eNB soft modem" echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do ...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting gNB soft modem" echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do ...@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting eNB soft modem" echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do ...@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
#now generate USIM files #now generate USIM files
...@@ -38,6 +42,8 @@ cd $PREFIX ...@@ -38,6 +42,8 @@ cd $PREFIX
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then ...@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then
new_args+=("$PREFIX/etc/ue.conf") new_args+=("$PREFIX/etc/ue.conf")
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting LTE UE soft modem" echo "== Starting LTE UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do ...@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do ...@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do
shift shift
done done
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting NR UE soft modem" echo "== Starting NR UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -1290,42 +1290,33 @@ typedef struct ...@@ -1290,42 +1290,33 @@ typedef struct
} nfapi_nr_pucch_pdu_t; } nfapi_nr_pucch_pdu_t;
//for srs_pdu: typedef struct {
uint16_t rnti; // UE RNTI, Value: 1->65535
typedef struct uint32_t handle; // An opaque handling returned in the SRS.indication
{ uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
uint16_t rnti;//UE RNTI uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
uint32_t handle;//An opaque handling returned in the SRS.indication uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
//BWP uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
uint16_t bwp_size; uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
uint16_t bwp_start; uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
uint8_t subcarrier_spacing; uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
uint8_t cyclic_prefix; uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
uint8_t num_ant_ports; uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
uint8_t num_symbols; uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t num_repetitions; uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
uint8_t time_start_position;//Starting position in the time domain l0; Note: the MAC undertakes the translation from startPosition to 𝑙0 uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
uint8_t config_index; uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
uint16_t sequence_id; uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
uint8_t bandwidth_index; uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
uint8_t comb_size; uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t comb_offset;//Transmission comb offset 𝑘 ̄ TC [TS38.211, Sec 6.4.1.4.3] Value: 0 → 1 (combSize = 0) Value: 0 → 3 (combSize = 1) uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
uint8_t cyclic_shift; uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
uint8_t frequency_position; uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
uint16_t frequency_shift; uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
uint8_t frequency_hopping;
uint8_t group_or_sequence_hopping;//Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRS-Resource
uint8_t resource_type;//Type of SRS resource allocation
uint16_t t_srs;//SRS-Periodicity in slots [TS38.211 Sec 6.4.1.4.4] Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
uint16_t t_offset;//Slot offset value [TS38.211, Sec 6.4.1.4.3] Value:0->2559
nfapi_nr_ul_beamforming_t beamforming; nfapi_nr_ul_beamforming_t beamforming;
} nfapi_nr_srs_pdu_t; } nfapi_nr_srs_pdu_t;
//
typedef enum { typedef enum {
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE = 0, NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE = 0,
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE = 1, NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE = 1,
......
...@@ -613,6 +613,10 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -613,6 +613,10 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) { for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t)); gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t**)malloc16_clear(MAX_NUM_NR_SRS_AP*sizeof(int32_t*));
for(int ap=0; ap<MAX_NUM_NR_SRS_AP; ap++) {
gNB->nr_srs_info[id]->srs_generated_signal[ap] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
}
} }
generate_ul_reference_signal_sequences(SHRT_MAX); generate_ul_reference_signal_sequences(SHRT_MAX);
...@@ -767,6 +771,10 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB) ...@@ -767,6 +771,10 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(gNB->nr_csi_info); free_and_zero(gNB->nr_csi_info);
for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) { for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) {
for(int i=0; i<MAX_NUM_NR_SRS_AP; i++) {
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal[i]);
}
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal);
free_and_zero(gNB->nr_srs_info[id]); free_and_zero(gNB->nr_srs_info[id]);
} }
......
...@@ -71,12 +71,12 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB, ...@@ -71,12 +71,12 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
const int slot, const int slot,
const nfapi_nr_srs_pdu_t *srs_pdu, const nfapi_nr_srs_pdu_t *srs_pdu,
const nr_srs_info_t *nr_srs_info, const nr_srs_info_t *nr_srs_info,
const int32_t *srs_generated_signal, const int32_t **srs_generated_signal,
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)], int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
int32_t srs_ls_estimated_channel[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)], int32_t srs_ls_estimated_channel[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
int32_t srs_estimated_channel_freq[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)], int32_t srs_estimated_channel_freq[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
int32_t srs_estimated_channel_time[][gNB->frame_parms.ofdm_symbol_size], int32_t srs_estimated_channel_time[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
int32_t srs_estimated_channel_time_shifted[][gNB->frame_parms.ofdm_symbol_size], int32_t srs_estimated_channel_time_shifted[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
uint32_t *signal_power, uint32_t *signal_power,
uint32_t *noise_power_per_rb, uint32_t *noise_power_per_rb,
uint32_t *noise_power, uint32_t *noise_power,
......
...@@ -315,19 +315,19 @@ int nr_find_pucch(uint16_t rnti, ...@@ -315,19 +315,19 @@ int nr_find_pucch(uint16_t rnti,
NR_gNB_SRS_t *new_gNB_srs(void); NR_gNB_SRS_t *new_gNB_srs(void);
void free_gNB_srs(NR_gNB_SRS_t *srs); void free_gNB_srs(NR_gNB_SRS_t *srs);
int nr_find_srs(uint16_t rnti, int nr_find_srs(rnti_t rnti,
int frame, frame_t frame,
int slot, slot_t slot,
PHY_VARS_gNB *gNB); PHY_VARS_gNB *gNB);
void nr_fill_srs(PHY_VARS_gNB *gNB, void nr_fill_srs(PHY_VARS_gNB *gNB,
int frame, frame_t frame,
int slot, slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu); nfapi_nr_srs_pdu_t *srs_pdu);
int nr_get_srs_signal(PHY_VARS_gNB *gNB, int nr_get_srs_signal(PHY_VARS_gNB *gNB,
int frame, frame_t frame,
int slot, slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu, nfapi_nr_srs_pdu_t *srs_pdu,
nr_srs_info_t *nr_srs_info, nr_srs_info_t *nr_srs_info,
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]); int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]);
......
...@@ -30,10 +30,12 @@ ...@@ -30,10 +30,12 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include "PHY/INIT/phy_init.h"
#include "PHY/impl_defs_nr.h" #include "PHY/impl_defs_nr.h"
#include "PHY/defs_nr_common.h" #include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h" #include "PHY/defs_gNB.h"
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h> #include "PHY/CODING/nrSmallBlock/nr_small_block_defs.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
...@@ -54,9 +56,9 @@ void free_gNB_srs(NR_gNB_SRS_t *srs) ...@@ -54,9 +56,9 @@ void free_gNB_srs(NR_gNB_SRS_t *srs)
free_and_zero(srs); free_and_zero(srs);
} }
int nr_find_srs(uint16_t rnti, int nr_find_srs(rnti_t rnti,
int frame, frame_t frame,
int slot, slot_t slot,
PHY_VARS_gNB *gNB) { PHY_VARS_gNB *gNB) {
AssertFatal(gNB!=NULL,"gNB is null\n"); AssertFatal(gNB!=NULL,"gNB is null\n");
...@@ -78,8 +80,8 @@ int nr_find_srs(uint16_t rnti, ...@@ -78,8 +80,8 @@ int nr_find_srs(uint16_t rnti,
} }
void nr_fill_srs(PHY_VARS_gNB *gNB, void nr_fill_srs(PHY_VARS_gNB *gNB,
int frame, frame_t frame,
int slot, slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu) { nfapi_nr_srs_pdu_t *srs_pdu) {
int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB); int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB);
...@@ -94,23 +96,28 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, ...@@ -94,23 +96,28 @@ void nr_fill_srs(PHY_VARS_gNB *gNB,
} }
int nr_get_srs_signal(PHY_VARS_gNB *gNB, int nr_get_srs_signal(PHY_VARS_gNB *gNB,
int frame, frame_t frame,
int slot, slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu, nfapi_nr_srs_pdu_t *srs_pdu,
nr_srs_info_t *nr_srs_info, nr_srs_info_t *nr_srs_info,
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) { int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) {
if(nr_srs_info->sc_list_length == 0) { #ifdef SRS_DEBUG
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot); LOG_I(NR_PHY,"Calling %s function\n", __FUNCTION__);
return -1; #endif
}
int32_t **rxdataF = gNB->common_vars.rxdataF; int32_t **rxdataF = gNB->common_vars.rxdataF;
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
const uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot
const uint8_t l0 = frame_parms->symbols_per_slot - 1 - srs_pdu->time_start_position; // starting symbol in this slot
const uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size;
const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*NR_NB_SC_PER_RB;
uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot const uint8_t N_ap = 1<<srs_pdu->num_ant_ports;
uint8_t l0 = frame_parms->symbols_per_slot - 1 - srs_pdu->time_start_position; // starting symbol in this slot const uint8_t N_symb_SRS = 1<<srs_pdu->num_symbols;
uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size; const uint8_t K_TC = 2<<srs_pdu->comb_size;
const uint16_t M_sc_b_SRS = srs_bandwidth_config[srs_pdu->config_index][srs_pdu->bandwidth_index][0] * NR_NB_SC_PER_RB/K_TC;
int32_t *rx_signal; int32_t *rx_signal;
bool no_srs_signal = true; bool no_srs_signal = true;
...@@ -119,32 +126,56 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, ...@@ -119,32 +126,56 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t)); memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t));
rx_signal = &rxdataF[ant][symbol_offset]; rx_signal = &rxdataF[ant][symbol_offset];
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) { for (int p_index = 0; p_index < N_ap; p_index++) {
srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] = rx_signal[nr_srs_info->sc_list[sc_idx]];
if (rx_signal[nr_srs_info->sc_list[sc_idx]] != 0) { #ifdef SRS_DEBUG
no_srs_signal = false; LOG_I(NR_PHY,"===== UE port %d --> gNB Rx antenna %i =====\n", p_index, ant);
} #endif
for (int l_line = 0; l_line < N_symb_SRS; l_line++) {
#ifdef SRS_DEBUG #ifdef SRS_DEBUG
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12; LOG_I(NR_PHY,":::::::: OFDM symbol %d ::::::::\n", l0+l_line);
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
if(subcarrier_log < 0) {
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
}
if(sc_idx == 0) {
LOG_I(NR_PHY,"________ Rx antenna %i ________\n", ant);
}
if(subcarrier_log%12 == 0) {
LOG_I(NR_PHY,"::::::::::::: %i :::::::::::::\n", subcarrier_log/12);
}
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
subcarrier_log,
(int16_t)(srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]&0xFFFF),
(int16_t)((srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]>>16)&0xFFFF));
#endif #endif
}
} uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][l_line];
if (subcarrier>frame_parms->ofdm_symbol_size) {
subcarrier -= frame_parms->ofdm_symbol_size;
}
uint16_t l_line_offset = l_line*frame_parms->ofdm_symbol_size;
for (int k = 0; k < M_sc_b_SRS; k++) {
srs_received_signal[ant][l_line_offset+subcarrier] = rx_signal[l_line_offset+subcarrier];
if (rx_signal[l_line_offset+subcarrier] != 0) {
no_srs_signal = false;
}
#ifdef SRS_DEBUG
int subcarrier_log = subcarrier-subcarrier_offset;
if(subcarrier_log < 0) {
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
}
if(subcarrier_log%12 == 0) {
LOG_I(NR_PHY,"------------ %d ------------\n", subcarrier_log/12);
}
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
subcarrier_log,
(int16_t)(srs_received_signal[ant][l_line_offset+subcarrier]&0xFFFF),
(int16_t)((srs_received_signal[ant][l_line_offset+subcarrier]>>16)&0xFFFF));
#endif
// Subcarrier increment
subcarrier += K_TC;
if (subcarrier >= frame_parms->ofdm_symbol_size) {
subcarrier=subcarrier-frame_parms->ofdm_symbol_size;
}
} // for (int k = 0; k < M_sc_b_SRS; k++)
} // for (int l_line = 0; l_line < N_symb_SRS; l_line++)
} // for (int p_index = 0; p_index < N_ap; p_index++)
} // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++)
if (no_srs_signal) { if (no_srs_signal) {
LOG_W(NR_PHY, "No SRS signal\n"); LOG_W(NR_PHY, "No SRS signal\n");
......
...@@ -131,11 +131,19 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY] ...@@ -131,11 +131,19 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
#endif #endif
; ;
// TS 38.211 - Table 6.4.1.4.2-1
EXTERN const uint16_t srs_max_number_cs[3]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= {8, 12, 6}
#endif
;
/*************** FUNCTIONS *****************************************/ /*************** FUNCTIONS *****************************************/
/** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 38.211 6.4.1.4 Sounding reference signal /** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 38.211 6.4.1.4 Sounding reference signal
@param frame_parms NR DL Frame parameters @param frame_parms NR DL Frame parameters
@param txdataF pointer to the frequency domain TX signal @param txdataF pointer to the frequency domain TX signal
@param symbol_offset symbol offset added in txdataF
@param nr_srs_info pointer to the srs info structure @param nr_srs_info pointer to the srs info structure
@param amp amplitude of generated signal @param amp amplitude of generated signal
@param frame_number frame number @param frame_number frame number
...@@ -144,11 +152,12 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY] ...@@ -144,11 +152,12 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu, int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr, int32_t **txdataF,
uint16_t symbol_offset,
nr_srs_info_t *nr_srs_info, nr_srs_info_t *nr_srs_info,
int16_t amp, int16_t amp,
int frame_number, frame_t frame_number,
int slot_number); slot_t slot_number);
/** \brief This function checks for periodic srs if srs should be transmitted in this slot /** \brief This function checks for periodic srs if srs should be transmitted in this slot
* @param p_SRS_Resource pointer to active resource * @param p_SRS_Resource pointer to active resource
......
...@@ -85,38 +85,30 @@ void multadd_real_vector_complex_scalar(int16_t *x, ...@@ -85,38 +85,30 @@ void multadd_real_vector_complex_scalar(int16_t *x,
uint32_t i; uint32_t i;
// do 8 multiplications at a time // do 8 multiplications at a time
simd_q15_t alpha_r_128,alpha_i_128,yr,yi,*x_128=(simd_q15_t*)x,*y_128=(simd_q15_t*)y; simd_q15_t alpha_r_128, alpha_i_128, yr, yi, *x_128 = (simd_q15_t *)x, *y_128 = (simd_q15_t *)y;
int j;
// printf("alpha = %d,%d\n",alpha[0],alpha[1]); // printf("alpha = %d,%d\n",alpha[0],alpha[1]);
alpha_r_128 = set1_int16(alpha[0]); alpha_r_128 = set1_int16(alpha[0]);
alpha_i_128 = set1_int16(alpha[1]); alpha_i_128 = set1_int16(alpha[1]);
j=0;
for (i=0; i<N>>3; i++) { for (i=0; i<N>>3; i++) {
yr = mulhi_s1_int16(alpha_r_128,x_128[i]); yr = mulhi_s1_int16(alpha_r_128,x_128[i]);
yi = mulhi_s1_int16(alpha_i_128,x_128[i]); yi = mulhi_s1_int16(alpha_i_128,x_128[i]);
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
y_128[j] = _mm_adds_epi16(y_128[j],_mm_unpacklo_epi16(yr,yi)); const simd_q15_t tmp = _mm_loadu_si128(y_128);
j++; _mm_storeu_si128(y_128++, _mm_adds_epi16(tmp, _mm_unpacklo_epi16(yr, yi)));
y_128[j] = _mm_adds_epi16(y_128[j],_mm_unpackhi_epi16(yr,yi)); const simd_q15_t tmp2 = _mm_loadu_si128(y_128);
j++; _mm_storeu_si128(y_128++, _mm_adds_epi16(tmp2, _mm_unpackhi_epi16(yr, yi)));
#elif defined(__arm__) #elif defined(__arm__)
int16x8x2_t yint; int16x8x2_t yint;
yint = vzipq_s16(yr,yi); yint = vzipq_s16(yr,yi);
y_128[j] = adds_int16(y_128[j],yint.val[0]); *y_128 = adds_int16(*y_128, yint.val[0]);
j++; j++;
y_128[j] = adds_int16(y_128[j],yint.val[1]); *y_128 = adds_int16(*y_128, yint.val[1]);
j++; j++;
#endif #endif
} }
_mm_empty();
_m_empty();
} }
void multadd_real_four_symbols_vector_complex_scalar(int16_t *x, void multadd_real_four_symbols_vector_complex_scalar(int16_t *x,
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
#define MAX_NUM_NR_RE (4*14*273*12) #define MAX_NUM_NR_RE (4*14*273*12)
#define MAX_NUM_NR_SRS_SYMBOLS 4 #define MAX_NUM_NR_SRS_SYMBOLS 4
#define MAX_NUM_NR_SRS_AP 4
#define NR_RX_NB_TH 1 #define NR_RX_NB_TH 1
#define NR_NB_TH_SLOT 2 #define NR_NB_TH_SLOT 2
...@@ -241,10 +242,9 @@ typedef struct { ...@@ -241,10 +242,9 @@ typedef struct {
} NR_PRACH_RESOURCES_t; } NR_PRACH_RESOURCES_t;
typedef struct { typedef struct {
uint16_t sc_list_length; uint8_t k_0_p[MAX_NUM_NR_SRS_AP][MAX_NUM_NR_SRS_SYMBOLS];
uint16_t sc_list[6*273];
uint8_t srs_generated_signal_bits; uint8_t srs_generated_signal_bits;
int32_t srs_generated_signal[OFDM_SYMBOL_SIZE_SAMPLES_MAX * MAX_NUM_NR_SRS_SYMBOLS]; int32_t **srs_generated_signal;
} nr_srs_info_t; } nr_srs_info_t;
typedef struct { typedef struct {
......
...@@ -807,10 +807,10 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -807,10 +807,10 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu; nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu;
uint8_t N_symb_SRS = 1<<srs_pdu->num_symbols; uint8_t N_symb_SRS = 1<<srs_pdu->num_symbols;
int32_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS]; int32_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS];
int32_t srs_ls_estimated_channel[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS]; int32_t srs_ls_estimated_channel[frame_parms->nb_antennas_rx][1<<srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size*N_symb_SRS];
int32_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS] __attribute__ ((aligned(32))); int32_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][1<<srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size*N_symb_SRS] __attribute__ ((aligned(32)));
int32_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size] __attribute__ ((aligned(32))); int32_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][1<<srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size] __attribute__ ((aligned(32)));
int32_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size]; int32_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][1<<srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size];
uint32_t noise_power_per_rb[srs_pdu->bwp_size]; uint32_t noise_power_per_rb[srs_pdu->bwp_size];
int8_t snr_per_rb[srs_pdu->bwp_size]; int8_t snr_per_rb[srs_pdu->bwp_size];
uint32_t signal_power; uint32_t signal_power;
...@@ -818,8 +818,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -818,8 +818,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
int8_t snr; int8_t snr;
// At least currently, the configuration is constant, so it is enough to generate the sequence just once. // At least currently, the configuration is constant, so it is enough to generate the sequence just once.
if(gNB->nr_srs_info[i]->sc_list_length == 0) { if(gNB->nr_srs_info[i]->srs_generated_signal_bits == 0) {
generate_srs_nr(srs_pdu, frame_parms, gNB->nr_srs_info[i]->srs_generated_signal, gNB->nr_srs_info[i], AMP, frame_rx, slot_rx); generate_srs_nr(srs_pdu, frame_parms, gNB->nr_srs_info[i]->srs_generated_signal, 0, gNB->nr_srs_info[i], AMP, frame_rx, slot_rx);
} }
const int srs_est = nr_get_srs_signal(gNB,frame_rx,slot_rx, srs_pdu, gNB->nr_srs_info[i], srs_received_signal); const int srs_est = nr_get_srs_signal(gNB,frame_rx,slot_rx, srs_pdu, gNB->nr_srs_info[i], srs_received_signal);
...@@ -830,7 +830,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -830,7 +830,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
slot_rx, slot_rx,
srs_pdu, srs_pdu,
gNB->nr_srs_info[i], gNB->nr_srs_info[i],
gNB->nr_srs_info[i]->srs_generated_signal, (const int32_t **) gNB->nr_srs_info[i]->srs_generated_signal,
srs_received_signal, srs_received_signal,
srs_ls_estimated_channel, srs_ls_estimated_channel,
srs_estimated_channel_freq, srs_estimated_channel_freq,
...@@ -844,10 +844,10 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -844,10 +844,10 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
} }
T(T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0), T(T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
T_BUFFER(srs_estimated_channel_freq[0], frame_parms->ofdm_symbol_size*sizeof(int32_t))); T_BUFFER(srs_estimated_channel_freq[0][0], frame_parms->ofdm_symbol_size*sizeof(int32_t)));
T(T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0), T(T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
T_BUFFER(srs_estimated_channel_time_shifted[0], frame_parms->ofdm_symbol_size*sizeof(int32_t))); T_BUFFER(srs_estimated_channel_time_shifted[0][0], frame_parms->ofdm_symbol_size*sizeof(int32_t)));
const uint16_t num_srs = gNB->UL_INFO.srs_ind.number_of_pdus; const uint16_t num_srs = gNB->UL_INFO.srs_ind.number_of_pdus;
gNB->UL_INFO.srs_ind.pdu_list = &gNB->srs_pdu_list[0]; gNB->UL_INFO.srs_ind.pdu_list = &gNB->srs_pdu_list[0];
...@@ -856,7 +856,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -856,7 +856,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB->srs_pdu_list[num_srs].handle = srs_pdu->handle; gNB->srs_pdu_list[num_srs].handle = srs_pdu->handle;
gNB->srs_pdu_list[num_srs].rnti = srs_pdu->rnti; gNB->srs_pdu_list[num_srs].rnti = srs_pdu->rnti;
gNB->srs_pdu_list[num_srs].timing_advance = srs_est >= 0 ? nr_est_timing_advance_srs(frame_parms, gNB->srs_pdu_list[num_srs].timing_advance = srs_est >= 0 ? nr_est_timing_advance_srs(frame_parms,
srs_estimated_channel_time) : 0xFFFF; srs_estimated_channel_time[0]) : 0xFFFF;
gNB->srs_pdu_list[num_srs].num_symbols = 1<<srs_pdu->num_symbols; gNB->srs_pdu_list[num_srs].num_symbols = 1<<srs_pdu->num_symbols;
gNB->srs_pdu_list[num_srs].wide_band_snr = srs_est >= 0 ? (snr + 64)<<1 : 0xFF; // 0xFF will be set if this field is invalid gNB->srs_pdu_list[num_srs].wide_band_snr = srs_est >= 0 ? (snr + 64)<<1 : 0xFF; // 0xFF will be set if this field is invalid
gNB->srs_pdu_list[num_srs].num_reported_symbols = 1<<srs_pdu->num_symbols; gNB->srs_pdu_list[num_srs].num_reported_symbols = 1<<srs_pdu->num_symbols;
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
#include "common/ran_context.h" #include "common/ran_context.h"
//#define DEBUG_DCI
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
// Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs // Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs
...@@ -1247,8 +1249,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, ...@@ -1247,8 +1249,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu->format_type = default_pucch_fmt[rsetindex]; pucch_pdu->format_type = default_pucch_fmt[rsetindex];
pucch_pdu->initial_cyclic_shift = r_pucch%default_pucch_csset[rsetindex]; pucch_pdu->initial_cyclic_shift = r_pucch%default_pucch_csset[rsetindex];
if (rsetindex==3||rsetindex==7||rsetindex==11) pucch_pdu->initial_cyclic_shift*=6; if (rsetindex==3||rsetindex==7||rsetindex==11) pucch_pdu->initial_cyclic_shift*=6;
else if (rsetindex==1||rsetindex==2) pucch_pdu->initial_cyclic_shift*=3; else if (rsetindex==1||rsetindex==2) pucch_pdu->initial_cyclic_shift*=4;
else pucch_pdu->initial_cyclic_shift*=4; else pucch_pdu->initial_cyclic_shift*=3;
pucch_pdu->nr_of_symbols = nr_of_symb; pucch_pdu->nr_of_symbols = nr_of_symb;
pucch_pdu->start_symbol_index = start_symb; pucch_pdu->start_symbol_index = start_symb;
if (pucch_pdu->format_type == 1) pucch_pdu->time_domain_occ_idx = 0; // check this!! if (pucch_pdu->format_type == 1) pucch_pdu->time_domain_occ_idx = 0; // check this!!
...@@ -1827,7 +1829,37 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, ...@@ -1827,7 +1829,37 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
// UL-SCH indicator // UL-SCH indicator
pos += 1; pos += 1;
*dci_pdu |= ((uint64_t)dci_pdu_rel15->ulsch_indicator & 0x1) << (dci_size - pos); *dci_pdu |= ((uint64_t)dci_pdu_rel15->ulsch_indicator & 0x1) << (dci_size - pos);
break;
#ifdef DEBUG_DCI
LOG_I(NR_MAC,"============= NR_UL_DCI_FORMAT_0_1 =============\n");
LOG_I(NR_MAC,"dci_size = %i\n", dci_size);
LOG_I(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator);
LOG_I(NR_MAC,"dci_pdu_rel15->carrier_indicator.val = %i\n", dci_pdu_rel15->carrier_indicator.val);
LOG_I(NR_MAC,"dci_pdu_rel15->ul_sul_indicator.val = %i\n", dci_pdu_rel15->ul_sul_indicator.val);
LOG_I(NR_MAC,"dci_pdu_rel15->bwp_indicator.val = %i\n", dci_pdu_rel15->bwp_indicator.val);
LOG_I(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
LOG_I(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
LOG_I(NR_MAC,"dci_pdu_rel15->frequency_hopping_flag.val = %i\n", dci_pdu_rel15->frequency_hopping_flag.val);
LOG_I(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
LOG_I(NR_MAC,"dci_pdu_rel15->ndi = %i\n", dci_pdu_rel15->ndi);
LOG_I(NR_MAC,"dci_pdu_rel15->rv= %i\n", dci_pdu_rel15->rv);
LOG_I(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid);
LOG_I(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val);
LOG_I(NR_MAC,"dci_pdu_rel15->dai[1].val = %i\n", dci_pdu_rel15->dai[1].val);
LOG_I(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc);
LOG_I(NR_MAC,"dci_pdu_rel15->srs_resource_indicator.val = %i\n", dci_pdu_rel15->srs_resource_indicator.val);
LOG_I(NR_MAC,"dci_pdu_rel15->precoding_information.val = %i\n", dci_pdu_rel15->precoding_information.val);
LOG_I(NR_MAC,"dci_pdu_rel15->antenna_ports.val = %i\n", dci_pdu_rel15->antenna_ports.val);
LOG_I(NR_MAC,"dci_pdu_rel15->srs_request.val = %i\n", dci_pdu_rel15->srs_request.val);
LOG_I(NR_MAC,"dci_pdu_rel15->csi_request.val = %i\n", dci_pdu_rel15->csi_request.val);
LOG_I(NR_MAC,"dci_pdu_rel15->cbgti.val = %i\n", dci_pdu_rel15->cbgti.val);
LOG_I(NR_MAC,"dci_pdu_rel15->ptrs_dmrs_association.val = %i\n", dci_pdu_rel15->ptrs_dmrs_association.val);
LOG_I(NR_MAC,"dci_pdu_rel15->beta_offset_indicator.val = %i\n", dci_pdu_rel15->beta_offset_indicator.val);
LOG_I(NR_MAC,"dci_pdu_rel15->dmrs_sequence_initialization.val = %i\n", dci_pdu_rel15->dmrs_sequence_initialization.val);
LOG_I(NR_MAC,"dci_pdu_rel15->ulsch_indicator = %i\n", dci_pdu_rel15->ulsch_indicator);
#endif
break;
} }
break; break;
......
...@@ -1092,7 +1092,7 @@ void fill_initial_SpCellConfig(int uid, ...@@ -1092,7 +1092,7 @@ void fill_initial_SpCellConfig(int uid,
// We are using do_srs = 0 here because the periodic SRS will only be enabled in update_cellGroupConfig() if do_srs == 1 // We are using do_srs = 0 here because the periodic SRS will only be enabled in update_cellGroupConfig() if do_srs == 1
initialUplinkBWP->srs_Config = calloc(1,sizeof(*initialUplinkBWP->srs_Config)); initialUplinkBWP->srs_Config = calloc(1,sizeof(*initialUplinkBWP->srs_Config));
config_srs(initialUplinkBWP->srs_Config, curr_bwp, uid, 0, 0); config_srs(initialUplinkBWP->srs_Config, NULL, curr_bwp, uid, 0, 0);
scheduling_request_config(scc, pucch_Config); scheduling_request_config(scc, pucch_Config);
...@@ -1596,6 +1596,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, ...@@ -1596,6 +1596,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
calloc(1,sizeof(*SpCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config)); calloc(1,sizeof(*SpCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config));
} }
config_srs(SpCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config, config_srs(SpCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config,
uecap,
curr_bwp, curr_bwp,
uid, uid,
0, 0,
...@@ -1620,6 +1621,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, ...@@ -1620,6 +1621,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
NR_BWP_Uplink_t *ul_bwp = UL_BWP_list->list.array[i]; NR_BWP_Uplink_t *ul_bwp = UL_BWP_list->list.array[i];
int bwp_size = NRRIV2BW(ul_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); int bwp_size = NRRIV2BW(ul_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE);
config_srs(ul_bwp->bwp_Dedicated->srs_Config, config_srs(ul_bwp->bwp_Dedicated->srs_Config,
uecap,
bwp_size, bwp_size,
uid, uid,
i+1, i+1,
......
...@@ -352,6 +352,7 @@ long rrc_get_max_nr_csrs(const uint8_t max_rbs, const long b_SRS) { ...@@ -352,6 +352,7 @@ long rrc_get_max_nr_csrs(const uint8_t max_rbs, const long b_SRS) {
} }
void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config, void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config,
const NR_UE_NR_Capability_t *uecap,
const int curr_bwp, const int curr_bwp,
const int uid, const int uid,
const int res_id, const int res_id,
...@@ -418,6 +419,26 @@ void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config, ...@@ -418,6 +419,26 @@ void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config,
NR_SRS_Resource_t *srs_res0=calloc(1,sizeof(*srs_res0)); NR_SRS_Resource_t *srs_res0=calloc(1,sizeof(*srs_res0));
srs_res0->srs_ResourceId = res_id; srs_res0->srs_ResourceId = res_id;
srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1; srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1;
// if (uecap &&
// uecap->featureSets &&
// uecap->featureSets->featureSetsUplink &&
// uecap->featureSets->featureSetsUplink->list.count > 0) {
// NR_FeatureSetUplink_t *ul_feature_setup = uecap->featureSets->featureSetsUplink->list.array[0];
// switch (ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource) {
// case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n1:
// srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1;
// break;
// case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n2:
// srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports2;
// break;
// case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n4:
// srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports4;
// break;
// default:
// LOG_E(NR_RRC, "Max Number of SRS Ports Per Resource %ld is invalid!\n",
// ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource);
// }
// }
srs_res0->ptrs_PortIndex = NULL; srs_res0->ptrs_PortIndex = NULL;
srs_res0->transmissionComb.present = NR_SRS_Resource__transmissionComb_PR_n2; srs_res0->transmissionComb.present = NR_SRS_Resource__transmissionComb_PR_n2;
srs_res0->transmissionComb.choice.n2 = calloc(1,sizeof(*srs_res0->transmissionComb.choice.n2)); srs_res0->transmissionComb.choice.n2 = calloc(1,sizeof(*srs_res0->transmissionComb.choice.n2));
...@@ -1116,6 +1137,7 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp, ...@@ -1116,6 +1137,7 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
ubwp->bwp_Dedicated->srs_Config = calloc(1,sizeof(*ubwp->bwp_Dedicated->srs_Config)); ubwp->bwp_Dedicated->srs_Config = calloc(1,sizeof(*ubwp->bwp_Dedicated->srs_Config));
config_srs(ubwp->bwp_Dedicated->srs_Config, config_srs(ubwp->bwp_Dedicated->srs_Config,
NULL,
curr_bwp, curr_bwp,
uid, uid,
bwp_loop+1, bwp_loop+1,
......
...@@ -145,6 +145,7 @@ void config_csirs(const NR_ServingCellConfigCommon_t *servingcellconfigcommon, ...@@ -145,6 +145,7 @@ void config_csirs(const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
void config_csiim(int do_csirs, int dl_antenna_ports, int curr_bwp, void config_csiim(int do_csirs, int dl_antenna_ports, int curr_bwp,
NR_CSI_MeasConfig_t *csi_MeasConfig, int id); NR_CSI_MeasConfig_t *csi_MeasConfig, int id);
void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config, void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config,
const NR_UE_NR_Capability_t *uecap,
const int curr_bwp, const int curr_bwp,
const int uid, const int uid,
const int res_id, const int res_id,
......
...@@ -489,7 +489,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -489,7 +489,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
int curr_bwp = NRRIV2BW(servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); int curr_bwp = NRRIV2BW(servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,MAX_BWP_SIZE);
initialUplinkBWP->srs_Config = calloc(1,sizeof(*initialUplinkBWP->srs_Config)); initialUplinkBWP->srs_Config = calloc(1,sizeof(*initialUplinkBWP->srs_Config));
config_srs(initialUplinkBWP->srs_Config, curr_bwp, uid, 0, configuration->do_SRS); config_srs(initialUplinkBWP->srs_Config, NULL, curr_bwp, uid, 0, configuration->do_SRS);
// Downlink BWPs // Downlink BWPs
int n_dl_bwp = 1; int n_dl_bwp = 1;
......
...@@ -28,7 +28,6 @@ gNBs = ...@@ -28,7 +28,6 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
min_rxtxtime = 2;
do_CSIRS = 1; do_CSIRS = 1;
do_SRS = 1; do_SRS = 1;
...@@ -283,8 +282,8 @@ RUs = ( ...@@ -283,8 +282,8 @@ RUs = (
local_rf = "yes" local_rf = "yes"
nb_tx = 1 nb_tx = 1
nb_rx = 1 nb_rx = 1
att_tx = 6; att_tx = 12;
att_rx = 6; att_rx = 12;
bands = [78]; bands = [78];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 114; max_rxgain = 114;
......
...@@ -27,15 +27,14 @@ gNBs = ...@@ -27,15 +27,14 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
pdsch_AntennaPorts_XP = 1; pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2; pusch_AntennaPorts = 2;
do_CSIRS = 0; do_CSIRS = 1;
ul_prbblacklist = "79,80,81,82"
pdcch_ConfigSIB1 = ( pdcch_ConfigSIB1 = (
{ {
controlResourceSetZero = 12; controlResourceSetZero = 12;
searchSpaceZero = 10; searchSpaceZero = 0;
} }
); );
...@@ -67,7 +66,7 @@ gNBs = ...@@ -67,7 +66,7 @@ gNBs =
initialDLBWPsubcarrierSpacing = 1; initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon #pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12; initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 10; initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon #uplinkConfigCommon
#frequencyInfoUL #frequencyInfoUL
...@@ -203,9 +202,11 @@ MACRLCs = ( ...@@ -203,9 +202,11 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150; pusch_TargetSNRx10 = 300;
pucch_TargetSNRx10 = 200; pucch_TargetSNRx10 = 200;
pusch_FailureThres = 1000;
ulsch_max_frame_inactivity = 0; ulsch_max_frame_inactivity = 0;
ul_max_mcs = 28;
} }
); );
......
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