Merge branch 'integration_2023_w43' into 'develop'

integration_2023_w43

See merge request oai/openairinterface5g!2415

* !2407 hotfix: UE DCI format 11: only 1 dl_config instead of 2
* !2372 chore(ci): testing up to 10 UEs in 5G RF simulation
* !2396 Add optimized function to count the number of bits set in uint64_t variable
* !2383 E1: implement release bearer, handle multiple CU-UPs
* !2413 Assigned value is garbage or undefined reported by scan-build
* !2387 Small fixes for UE stability and introduction of ITTI "no-thread" mode (separate bug fixes and ITTI changes?)
* !2410 Fix CellGroupConfig-related memory problems
* !2414 fix doxygen
This commit is contained in:
Robert Schmidt
2023-10-30 16:26:11 +00:00
231 changed files with 4835 additions and 4581 deletions
+6 -7
View File
@@ -1216,6 +1216,10 @@ set(NR_PDCP_SRC
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia1.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
openair2/LAYER2/nr_pdcp/cuup_cucp_if.c
openair2/LAYER2/nr_pdcp/cuup_cucp_direct.c
openair2/LAYER2/nr_pdcp/cuup_cucp_e1ap.c
)
set(NR_SDAP_SRC
@@ -1277,6 +1281,7 @@ set(L2_NR_SRC
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${NR_RRC_DIR}/rrc_gNB_NGAP.c
${NR_RRC_DIR}/rrc_gNB_radio_bearers.c
${NR_RRC_DIR}/rrc_gNB_cuup.c
)
set(L2_SRC_UE
@@ -1445,12 +1450,6 @@ add_library(e1_if
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U)
add_library(e1_pdcp_if
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_e1_api.c
)
target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc)
if(E2_AGENT)
target_link_libraries(L2_NR PUBLIC e2_agent e2_ran_func)
@@ -2106,7 +2105,7 @@ add_executable(nr-cuup
target_link_libraries(nr-cuup PRIVATE
CONFIG_LIB ITTI SCTP_CLIENT
GTPV1U e1ap e1_pdcp_if f1ap SIMU_ETH
GTPV1U e1ap f1ap SIMU_ETH
z sctp dl pthread shlib_loader ${T_LIB})
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
+72
View File
@@ -161,6 +161,78 @@ rfsim5g_ue2:
DetachScript: docker stop rfsim5g-oai-nr-ue2
MTU: 1500
rfsim5g_ue3:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue3 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue3
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue3
DetachScript: docker stop rfsim5g-oai-nr-ue3
MTU: 1500
rfsim5g_ue4:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue4 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue4
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue4
DetachScript: docker stop rfsim5g-oai-nr-ue4
MTU: 1500
rfsim5g_ue5:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue5 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue5
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue5
DetachScript: docker stop rfsim5g-oai-nr-ue5
MTU: 1500
rfsim5g_ue6:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue6 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue6
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue6
DetachScript: docker stop rfsim5g-oai-nr-ue6
MTU: 1500
rfsim5g_ue7:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue7 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue7
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue7
DetachScript: docker stop rfsim5g-oai-nr-ue7
MTU: 1500
rfsim5g_ue8:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue8 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue8
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue8
DetachScript: docker stop rfsim5g-oai-nr-ue8
MTU: 1500
rfsim5g_ue9:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue9 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue9
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue9
DetachScript: docker stop rfsim5g-oai-nr-ue9
MTU: 1500
rfsim5g_ue10:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-nr-ue10 ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue10
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue10
DetachScript: docker stop rfsim5g-oai-nr-ue10
MTU: 1500
rfsim5g_ext_dn:
Host: localhost
NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0
+3
View File
@@ -289,6 +289,7 @@ class Containerize():
self.proxyCommit = None
self.eNB_instance = 0
self.eNB_serverId = ['', '', '']
self.deployKind = [True, True, True]
self.yamlPath = ['', '', '']
self.services = ['', '', '']
self.nb_healthy = [0, 0, 0]
@@ -835,6 +836,7 @@ class Containerize():
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
self.deployKind[self.eNB_instance] = True
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
@@ -1037,6 +1039,7 @@ class Containerize():
logging.debug('\u001B[1m Checking Services to deploy\u001B[0m')
# Implicitly we are running locally
myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
self.deployKind[0] = False
cmd = 'docker-compose config --services'
listServices = myCmd.run(cmd)
if listServices.returncode != 0:
+17 -5
View File
@@ -43,7 +43,7 @@ import logging
import datetime
import signal
import statistics as stat
from multiprocessing import SimpleQueue
from multiprocessing import SimpleQueue, Lock
import concurrent.futures
#import our libs
@@ -494,7 +494,7 @@ class OaiCiTest():
messages = [f.result() for f in futures]
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
def Ping_common(self, EPC, ue, RAN):
def Ping_common(self, EPC, ue, RAN, printLock):
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
ping_status = 0
ueIP = ue.getIP()
@@ -551,6 +551,8 @@ class OaiCiTest():
avg_msg = f'RTT(Avg) : {rtt_avg} ms'
max_msg = f'RTT(Max) : {rtt_max} ms'
# adding a lock for cleaner display in command line
printLock.acquire()
logging.info(f'\u001B[1;37;44m ping result for {ue_header} \u001B[0m')
logging.info(f'\u001B[1;34m {pal_msg} \u001B[0m')
logging.info(f'\u001B[1;34m {min_msg} \u001B[0m')
@@ -563,6 +565,7 @@ class OaiCiTest():
if float(packetloss) > float(self.ping_packetloss_threshold):
message += '\nPacket Loss too high'
logging.error(f'\u001B[1;37;41m Packet Loss too high; Target: {self.ping_packetloss_threshold}%\u001B[0m')
printLock.release()
return (False, message)
elif float(packetloss) > 0:
message += '\nPacket Loss is not 0%'
@@ -573,7 +576,9 @@ class OaiCiTest():
ping_rttavg_error_msg = f'RTT(Avg) too high: {rtt_avg} ms; Target: {self.ping_rttavg_threshold} ms'
message += f'\n {ping_rttavg_error_msg}'
logging.error('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m')
printLock.release()
return (False, message)
printLock.release()
return (True, message)
@@ -587,8 +592,9 @@ class OaiCiTest():
ues = [cls_module_ue.Module_UE(n.strip()) for n in self.ue_ids]
logging.debug(ues)
pingLock = Lock()
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(self.Ping_common, EPC, ue, RAN) for ue in ues]
futures = [executor.submit(self.Ping_common, EPC, ue, RAN, pingLock) for ue in ues]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
@@ -1358,7 +1364,10 @@ class OaiCiTest():
for instance in range(0, len(CONTAINERS.yamlPath)):
if CONTAINERS.yamlPath[instance]!='':
CONTAINERS.eNB_instance=instance
CONTAINERS.UndeployObject(HTML,RAN)
if CONTAINERS.deployKind[instance]:
CONTAINERS.UndeployObject(HTML,RAN)
else:
CONTAINERS.UndeployGenObject(HTML,RAN, self)
RAN.prematureExit=True
#this function is called only if eNB/gNB fails to start
@@ -1385,7 +1394,10 @@ class OaiCiTest():
for instance in range(0, len(CONTAINERS.yamlPath)):
if CONTAINERS.yamlPath[instance]!='':
CONTAINERS.eNB_instance=instance
CONTAINERS.UndeployObject(HTML,RAN)
if CONTAINERS.deployKind[instance]:
CONTAINERS.UndeployObject(HTML,RAN)
else:
CONTAINERS.UndeployGenObject(HTML,RAN,self)
RAN.prematureExit=True
def IdleSleep(self,HTML):
+1 -1
View File
@@ -8,7 +8,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
@@ -8,7 +8,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
+6 -29
View File
@@ -7,7 +7,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
@@ -56,32 +56,9 @@ gNBs =
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
log_config : {
global_log_level = "info";
pdcp_log_level = "info";
f1ap_log_level = "info";
ngap_log_level = "info";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="debug";
pdcp_log_level ="info";
rrc_log_level ="info";
f1ap_log_level ="info";
ngap_log_level ="debug";
};
@@ -7,7 +7,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
@@ -56,23 +56,6 @@ gNBs =
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config: {
global_log_level = "info";
};
@@ -6,7 +6,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
@@ -10,7 +10,7 @@ gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
gNB_ID = 0xe00;
gNB_name = "gNB-Eurecom-n78_20";
+52 -1
View File
@@ -33,10 +33,15 @@
000002
000003
000004
000005
000006
000007
020001
020002
020003
020004
020105
444445
030001
030002
444444
@@ -44,7 +49,7 @@
020005
444444
333333
020005
020006
100001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
@@ -96,6 +101,30 @@
<nb_healthy>9</nb_healthy>
</testCase>
<testCase id="000005">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UEs (#3, #4, #5) RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-nr-ue3 oai-nr-ue4 oai-nr-ue5</services>
<nb_healthy>12</nb_healthy>
</testCase>
<testCase id="000006">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UEs (#6, #7, #8) RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-nr-ue6 oai-nr-ue7 oai-nr-ue8</services>
<nb_healthy>15</nb_healthy>
</testCase>
<testCase id="000007">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UEs (#9, #10) RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-nr-ue9 oai-nr-ue10</services>
<nb_healthy>17</nb_healthy>
</testCase>
<testCase id="020001">
<class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc>
@@ -136,6 +165,22 @@
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="020006">
<class>Ping</class>
<desc>Ping ext-dn from both UEs</desc>
<id>rfsim5g_ue rfsim5g_ue2</id>
<ping_args>-c 20 192.168.72.135</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="020105">
<class>Ping</class>
<desc>Ping ext-dn from all UEs</desc>
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
<ping_args>-c 100 192.168.72.135 -i 0.2 -s 1016</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="030001">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
@@ -166,6 +211,12 @@
<id>rfsim5g_ue rfsim5g_ue2</id>
</testCase>
<testCase id="444445">
<class>Detach_UE</class>
<desc>Detach OAI UE 2 to 10</desc>
<id>rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
</testCase>
<testCase id="100001">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
@@ -184,7 +184,7 @@ services:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
environment:
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
@@ -198,12 +198,11 @@ services:
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue2:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
environment:
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
@@ -217,6 +216,150 @@ services:
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue3:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue3
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001102 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.152
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue4:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue4
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001103 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.153
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue5:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue5
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001104 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.154
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue6:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue6
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001105 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.155
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue7:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue7
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001106 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.156
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue8:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue8
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001107 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.157
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue9:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue9
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001108 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.158
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue10:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue10
environment:
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001109 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.159
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
public_net:
File diff suppressed because one or more lines are too long
+11 -16
View File
@@ -338,10 +338,11 @@ function main() {
echo_info "Will compile with verbose instructions"
shift;;
--build-doxygen)
CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON"
BUILD_DOXYGEN=1
echo_info "Will build doxygen support"
shift;;
CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON"
TARGET_LIST="$TARGET_LIST doc"
BUILD_DOXYGEN=1
echo_info "Will build doxygen support"
shift;;
--disable-T-Tracer)
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
echo_info "Disabling the T tracer"
@@ -490,6 +491,12 @@ function main() {
echo_info "Running \"$CMAKE_CMD\""
eval $CMAKE_CMD
compilations $BUILD_DIR all.txt $TARGET_LIST
###################
# Doxygen Support #
###################
if [ "$BUILD_DOXYGEN" = "1" ] ; then
echo_info "Built Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/$BUILD_DIR/build/html/index.html"
fi
if [ "$UE" = 1 ] ; then
@@ -513,18 +520,6 @@ function main() {
fi
fi
###################
# Doxygen Support #
###################
if [ "$BUILD_DOXYGEN" = "1" ] ; then
doxygen_log=$OPENAIR_DIR/cmake_targets/log/doxygen.log
echo_info "Building Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/targets/DOCS/html/index.html"
echo_info "Doxygen generation log is located here: $doxygen_log"
echo_info "Generating Doxygen files....please wait"
(
$CMAKE --build . --target doc
) >& $doxygen_log
fi
##############
# Auto-tests #
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file common/config/cmdline/config_libconfig.c
/*! \file config_cmdline.c
* \brief configuration module, command line parsing implementation
* \author Francois TABURET
* \date 2017
+6 -27
View File
@@ -64,23 +64,13 @@
extern "C" {
#endif
/** @defgroup _LOG LOG Generator
* @{*/
/* @}*/
/** @defgroup _macro Macro Definition
* @ingroup _LOG
* @brief these macros are used in the code of LOG
* @{*/
/* @}*/
/** @defgroup _max_length Maximum Length of LOG
* @ingroup _macro
* @brief the macros that describe the maximum length of LOG
* @{*/
#define MAX_LOG_TOTAL 16384 /*!< \brief the maximum length of a log */
/* @}*/
/** @}*/
/** @defgroup _log_level Message levels defined by LOG
* @ingroup _macro
@@ -95,8 +85,7 @@ extern "C" {
# define OAILOG_TRACE 5 /*!< \brief second level debug-level messages, for developers, likely impact real-time behavior*/
#define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/
/* @}*/
/** @}*/
/** @defgroup _log_format Defined log format
* @ingroup _macro
@@ -112,15 +101,6 @@ extern "C" {
#define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */
#define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */
#define LOG_RESET "\033[0m" /*!< \brief VT100 sequence for reset (black) foreground */
/* @}*/
/** @defgroup _syslog_conf Macros for write in syslog.conf
* @ingroup _macro
* @brief Macros used to write lines (local/remote) in syslog.conf
* @{*/
#define FLAG_NOCOLOR 0x0001 /*!< \brief use colors in log messages, depending on level */
#define FLAG_THREAD 0x0008 /*!< \brief display thread name in log messages */
#define FLAG_LEVEL 0x0010 /*!< \brief display log level in log messages */
@@ -130,6 +110,7 @@ extern "C" {
#define FLAG_THREAD_ID 0x0200
#define FLAG_REAL_TIME 0x0400
#define FLAG_INITIALIZED 0x8000
/** @}*/
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
#define CLEAR_LOG_OPTION(O) g_log->flag = (g_log->flag & (~O))
@@ -333,7 +314,7 @@ typedef struct {
int enable_flag;
} log_mem_cnt_t;
/* @}*/
/** @}*/
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
\brief Write output file from signal data
@@ -460,8 +441,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
#define LOG_UI(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ; } while(0)
#define LOG_UDUMPMSG(c, b, s, f, x...) do { log_dump(c, b, s, f, x) ;} while (0) /* */
# define LOG_MM(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 1);} while(0)
/* @}*/
/** @}*/
/** @defgroup _useful_functions useful functions in LOG
* @ingroup _macro
@@ -472,8 +452,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
#define LOG_EXIT(c) do { LOG_END(c); return;}while(0) /*!< \brief Macro to log a message with severity TRACE when exiting a function */
#define LOG_RETURN(c,r) do {LOG_T(c,"Leaving %s (rc = %08lx)\n", __FUNCTION__ , (unsigned long)(r) );return(r);}while(0) /*!< \brief Macro to log a function exit, including integer value, then to return a value to the calling function */
/* @}*/
/** @}*/
#ifdef __cplusplus
}
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file common/utils/prach_utils.h
* \brief computation of some PRACH variables used in both MAC and PHY
* \author R. Knopp
* \date 2020
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file prach_utils.h
* \brief computation of some PRACH variables used in both MAC and PHY
* \author R. Knopp
* \date 2020
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
uint8_t get_prach_fmt(int prach_ConfigIndex,int frame_type);
uint8_t get_prach_prb_offset(int frame_type,
+25 -16
View File
@@ -30,17 +30,19 @@
extern "C" {
#include <intertask_interface.h>
#include <common/utils/system.h>
#include "executables/softmodem-common.h"
typedef struct timer_elm_s {
timer_type_t type; ///< Timer type
long instance;
long duration;
uint64_t timeout;
void *timer_arg; ///< Optional argument that will be passed when timer expires
} timer_elm_t ;
typedef struct timer_elm_s {
timer_type_t type; ///< Timer type
long instance;
long duration;
uint64_t timeout;
void *timer_arg; ///< Optional argument that will be passed when timer expires
} timer_elm_t;
typedef struct task_list_s {
task_info_t admin;
ittiTask_parms_t task_parms;
pthread_t thread;
pthread_mutex_t queue_cond_lock;
std::vector<MessageDef *> message_queue;
@@ -162,12 +164,12 @@ extern "C" {
pthread_mutex_lock (&t->queue_cond_lock);
int ret=itti_send_msg_to_task_locked(destination_task_id, destinationInstance, message);
while ( t->message_queue.size()>0 && t->admin.func != NULL ) {
while (t->message_queue.size() > 0 && t->task_parms.shortcut_func != NULL) {
if (t->message_queue.size()>1)
LOG_W(ITTI,"queue in no thread mode is %ld\n", t->message_queue.size());
pthread_mutex_unlock (&t->queue_cond_lock);
t->admin.func(NULL);
t->task_parms.shortcut_func(NULL);
pthread_mutex_lock (&t->queue_cond_lock);
}
@@ -327,11 +329,20 @@ extern "C" {
pthread_mutex_unlock (&t->queue_cond_lock);
}
int itti_create_task(task_id_t task_id,
void *(*start_routine)(void *),
void *args_p) {
int itti_create_task(const task_id_t task_id, void *(*start_routine)(void *), const ittiTask_parms_t *parms)
{
task_list_t *t=tasks[task_id];
threadCreate (&t->thread, start_routine, args_p, (char *)itti_get_task_name(task_id),-1,OAI_PRIORITY_RT);
if (get_softmodem_params()->no_itti && task_id < sizeofArray(tasks_info) && parms && parms->shortcut_func) {
LOG_W(ITTI, "not starting the thread for %s, the msg processing will be done in place\n", tasks_info[task_id].name);
t->task_parms.shortcut_func = parms->shortcut_func;
return 0;
}
threadCreate(&t->thread,
start_routine,
parms ? parms->args_to_start_routine : NULL,
(char *)itti_get_task_name(task_id),
-1,
OAI_PRIORITY_RT);
LOG_I(ITTI,"Created Posix thread %s\n", itti_get_task_name(task_id) );
return 0;
}
@@ -353,6 +364,7 @@ extern "C" {
AssertFatal(new_tasks != NULL, "could not realloc() tasks list");
tasks = new_tasks;
tasks[newQueue]= new task_list_t;
tasks[newQueue]->task_parms = {0};
pthread_mutex_unlock (&lock_nb_queues);
LOG_I(ITTI,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
pthread_mutex_init(&tasks[newQueue]->queue_cond_lock, NULL);
@@ -361,9 +373,6 @@ extern "C" {
AssertFatal( ( tasks[newQueue]->sem_fd = eventfd(0, EFD_SEMAPHORE) ) >=0, "");
itti_subscribe_event_fd((task_id_t)newQueue, tasks[newQueue]->sem_fd);
if (tasks[newQueue]->admin.threadFunc != NULL)
itti_create_task((task_id_t)newQueue, tasks[newQueue]->admin.threadFunc, NULL);
return newQueue;
}
+56 -74
View File
@@ -275,87 +275,69 @@ typedef uint32_t itti_message_types_t;
typedef unsigned long message_number_t;
#define MESSAGE_NUMBER_SIZE (sizeof(unsigned long))
typedef enum task_priorities_e {
TASK_PRIORITY_MAX = 100,
TASK_PRIORITY_MAX_LEAST = 85,
TASK_PRIORITY_MED_PLUS = 70,
TASK_PRIORITY_MED = 55,
TASK_PRIORITY_MED_LEAST = 40,
TASK_PRIORITY_MIN_PLUS = 25,
TASK_PRIORITY_MIN = 10,
} task_priorities_t;
typedef struct {
task_priorities_t priority;
unsigned int queue_size;
/* Printable name */
char name[256];
void *(*func)(void *) ;
void *(*threadFunc)(void *) ;
} task_info_t;
//
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL)
//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)
//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)
void *rrc_enb_process_msg(void *);
#define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \
TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX, 200, NULL, NULL) \
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NGAP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MCE_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MME_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000, NULL, NULL) \
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_CUCP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_CUUP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NSA_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NSA_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
#define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, 50) \
TASK_DEF(TASK_TIMER, 10) \
TASK_DEF(TASK_L2L1, 200) \
TASK_DEF(TASK_BM, 200) \
TASK_DEF(TASK_PHY_ENB, 200) \
TASK_DEF(TASK_MAC_GNB, 200) \
TASK_DEF(TASK_RLC_ENB, 200) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, 200) \
TASK_DEF(TASK_PDCP_ENB, 200) \
TASK_DEF(TASK_PDCP_GNB, 200) \
TASK_DEF(TASK_DATA_FORWARDING, 200) \
TASK_DEF(TASK_END_MARKER, 200) \
TASK_DEF(TASK_RRC_ENB, 200) \
TASK_DEF(TASK_RRC_GNB, 200) \
TASK_DEF(TASK_RAL_ENB, 200) \
TASK_DEF(TASK_S1AP, 200) \
TASK_DEF(TASK_NGAP, 200) \
TASK_DEF(TASK_X2AP, 200) \
TASK_DEF(TASK_M2AP_ENB, 200) \
TASK_DEF(TASK_M2AP_MCE, 200) \
TASK_DEF(TASK_M3AP, 200) \
TASK_DEF(TASK_M3AP_MME, 200) \
TASK_DEF(TASK_M3AP_MCE, 200) \
TASK_DEF(TASK_SCTP, 200) \
TASK_DEF(TASK_ENB_APP, 200) \
TASK_DEF(TASK_GNB_APP, 200) \
TASK_DEF(TASK_MCE_APP, 200) \
TASK_DEF(TASK_MME_APP, 200) \
TASK_DEF(TASK_PHY_UE, 200) \
TASK_DEF(TASK_MAC_UE, 200) \
TASK_DEF(TASK_RLC_UE, 200) \
TASK_DEF(TASK_PDCP_UE, 200) \
TASK_DEF(TASK_RRC_UE, 200) \
TASK_DEF(TASK_RRC_NRUE, 200) \
TASK_DEF(TASK_NAS_UE, 200) \
TASK_DEF(TASK_RAL_UE, 200) \
TASK_DEF(TASK_GTPV1_U, 1000) \
TASK_DEF(TASK_CU_F1, 200) \
TASK_DEF(TASK_DU_F1, 200) \
TASK_DEF(TASK_CUCP_E1, 200) \
TASK_DEF(TASK_CUUP_E1, 200) \
TASK_DEF(TASK_RRC_UE_SIM, 200) \
TASK_DEF(TASK_RRC_GNB_SIM, 200) \
TASK_DEF(TASK_RRC_NSA_UE, 200) \
TASK_DEF(TASK_RRC_NSA_NRUE, 200) \
TASK_DEF(TASK_NAS_NRUE, 200) \
TASK_DEF(TASK_MAX, 200)
#define TASK_DEF(TaskID, qUEUEsIZE) {qUEUEsIZE, #TaskID},
/* Map task id to printable name. */
static const task_info_t tasks_info[] = {
FOREACH_TASK(TASK_DEF)
};
#define TASK_ENUM(TaskID, pRIO, qUEUEsIZE, FuNc,ThreadFunc ) TaskID,
#define TASK_ENUM(TaskID, qUEUEsIZE) TaskID,
//! Tasks id of each task
typedef enum {
FOREACH_TASK(TASK_ENUM)
@@ -502,9 +484,11 @@ void itti_poll_msg(task_id_t task_id, MessageDef **received_msg);
\param args_p Optional argument to pass to the start routine
@returns -1 on failure, 0 otherwise
**/
int itti_create_task(task_id_t task_id,
void *(*start_routine) (void *),
void *args_p);
typedef struct {
void *args_to_start_routine;
void *(*shortcut_func)(void *);
} ittiTask_parms_t;
int itti_create_task(const task_id_t task_id, void *(*start_routine)(void *), const ittiTask_parms_t *args_p);
int itti_create_queue(const task_info_t *task_info);
@@ -568,8 +552,6 @@ void itti_set_task_real_time(task_id_t task_id);
void itti_send_terminate_message(task_id_t task_id);
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size);
void *calloc_or_fail(size_t size);
void *malloc_or_fail(size_t size);
int memory_read(const char *datafile, void *data, size_t size);
int itti_free(task_id_t task_id, void *ptr);
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file common/utils/telnetsrv/telnetsrv_nrue_measurements.c
/*! \file telnetsrv_5Gue_measurements.c
* \brief: implementation of telnet commands related to nrUE measurments
* \author Francois TABURET
* \date 2021
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file common/utils/telnetsrv/telnetsrv_phycmd.c
/*! \file telnetsrv_enb_phycmd.c
* \brief: implementation of telnet commands related to softmodem linux process
* \author Francois TABURET
* \date 2017
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file common/utils/telnetsrv_proccmd.h
/*! \file telnetsrv_loader.h
* \brief: Include file defining telnet commands related to softmodem linux process
* \author Francois TABURET
* \date 2018
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file common/utils/telnetsrv_proccmd.h
/*! \file telnetsrv_phycmd.h
* \brief: Include file defining telnet commands related to softmodem linux process
* \author Francois TABURET
* \date 2017
+7 -6
View File
@@ -56,23 +56,24 @@ static inline void *malloc16_clear( size_t size ) {
return ptr;
}
static inline void *calloc_or_fail(size_t size) {
void *ptr = calloc(1, size);
static inline void *calloc_or_fail(size_t nmemb, size_t size)
{
void *ptr = calloc(nmemb, size);
if (ptr == NULL) {
fprintf(stderr, "[UE] Failed to calloc %zu bytes", size);
fprintf(stderr, "Failed to calloc() %zu elements of %zu bytes: out of memory", nmemb, size);
exit(EXIT_FAILURE);
}
return ptr;
}
static inline void *malloc_or_fail(size_t size) {
static inline void *malloc_or_fail(size_t size)
{
void *ptr = malloc(size);
if (ptr == NULL) {
fprintf(stderr, "[UE] Failed to malloc %zu bytes", size);
fprintf(stderr, "Failed to malloc() %zu bytes: out of memory", size);
exit(EXIT_FAILURE);
}
+1451 -1625
View File
File diff suppressed because it is too large Load Diff
+55 -16
View File
@@ -2,38 +2,55 @@
# 1. Introduction
E1 is named for the interface that lies between the nodes CU Control Plane (CUCP) and CU User Plane (CUUP). Once the nodes are configured, all user plane traffic flows through CUUP.
E1 is the interface that lies between the nodes CU Control Plane (CUCP) and CU User Plane (CUUP). Once the nodes are configured, all user plane traffic flows through CUUP.
The E1 design in OAI follows the 3GPP specification in TS 38.460. The code design on E1 in OAI is very similar to
F1. The ITTI message passing mechanism is used to exchange messages between E1AP thread, SCTP thread and RRC thread.
The following sequence chart shows the current E1AP message flow.
The E1 design in OAI follows the 3GPP specification in TS 38.460/463. The code
design on E1 in OAI is very similar to F1: OAI uses E1 internally to set up
bearers, even in monolithic gNB, where the actual "way" the messages are passed
is abstracted through function pointers. More specifically, there are handlers
that handle the E1 messages as shown below, *which are the same* no matter if
the CU is integrated or separate in CU-CP/UP. The below sequence diagram lists
the handlers that are executed and the current E1AP message flow (SCTP
connection setup only in split-mode, the rest is the same for CU):
```mermaid
sequenceDiagram
participant c as CUCP
participant u as CUUP
u->>c: SCTP new association
c->>u: SCTP new association response
Note over u: Create UDP sockets for F1-U and N3
u->c: SCTP connection setup (in split mode)
u->>c: E1AP Setup Request
Note over c: Execute rrc_gNB_process_e1_setup_req()
c->>u: E1AP Setup Response
Note over c: Receives PDU session setup request from AMF
c->>u: Bearer Context Setup Request
Note over u: Configure DRBs and create GTP Tunnels for F1-U and N3
Note over u: Execute e1_bearer_context_setup()<br/>Configure DRBs and create GTP Tunnels for F1-U and N3
u->>c: Bearer Context Setup Response
Note over c: Sends F1-U UL TNL info to DU and receives DL TNL info
Note over c: Execute rrc_gNB_process_e1_setup_req()<br/>Sends F1-U UL TNL info to DU and receives DL TNL info
c->>u: Bearer Context Modification Request
Note over u: Updates GTP Tunnels with received info
Note over u: Execute e1_bearer_context_modif()<br/>Updates GTP Tunnels with received info
u->>c: Bearer Context Modification Response
Note over c: Execute rrc_gNB_process_e1_bearer_context_modif_resp()
Note over c: UE release triggered
c->>u: Bearer Context Release Request
Note over u: Execute e1_bearer_release_cmd()<br/>Frees GTP tunnels, PDCP data etc
u->>c: Bearer Context Release Complete
Note over c: Execute rrc_gNB_process_e1_bearer_context_release_cplt()
```
_Note that the E1 bearer release procedures are currently not implemented._
The files that implement the callback towards these handlers are in
- `cucp_cuup_direct.c`: integrated CU (for CP=>UP messages)
- `cucp_cuup_e1ap.c`: E1 split mode (for CP=>UP messages)
- `cuup_cucp_direct.c`: integrated CU (for UP=>CP messages)
- `cuup_cucp_e1ap.c`: E1 split mode (for UP=>CP messages)
# 2. Running the E1 Split
## 2.1 Configuration File
The gNB is started based on the node type that is specified in the configuration file. To start a gNB instance in CUCP or CUUP, the `tr_s_preference` should be set to "f1" and the config member `E1_INTERFACE` should be present in the config file. The `type` parameter within the `E1_INTERFACE` should be set to `cp`, and `nr-softmodem` should be used to run a CU-CP. The type should be `up` and `nr-cuup` should be used to run the CU-UP. Further, there are the parameters `ipv4_cucp` and `ipv4_cuup` to specify the IP addresses of the respective network functions.
The gNB is started based on the node type that is specified in the configuration file. To start a gNB instance in CUCP or CUUP, the `tr_s_preference` should be set to "f1" and the config member `E1_INTERFACE` should be present in the config file. The `type` parameter within the `E1_INTERFACE` should be set to `cp`, and executable `nr-softmodem` should be used to run a CU-CP. The type should be `up` and executable `nr-cuup` should be used to run the CU-UP. Further, there are the parameters `ipv4_cucp` and `ipv4_cuup` to specify the IP addresses of the respective network functions.
For CUCP, a typical `E1_INTERFACE` config looks like
```
@@ -62,7 +79,7 @@ One could take an existing CU configuration file and add the above parameters to
The CUUP uses the IP address specified in `local_s_address` for F1-U and `GNB_IPV4_ADDRESS_FOR_NGU` for N3 links. Note that `local_s_address` is under `gNBs` and `GNB_IPV4_ADDRESS_FOR_NGU` is part of the `NETWORK_INTERFACES` config member.
Alternatively, you can use the config files `ci-scripts/conf_files/gnb-cucp.sa.conf` and `ci-scripts/conf_files/gnb-cuup.sa.conf` which are already in the repository.
Alternatively, you can use the config files `ci-scripts/conf_files/gnb-cucp.sa.f1.conf` and `ci-scripts/conf_files/gnb-cuup.sa.f1.conf`.
## 2.2 Steps to Run the Split in rfsimulator with OAI UE
@@ -73,7 +90,7 @@ Note: A 5G core must be running at this point. Steps to start the OAI 5G core ca
1. Start the CUCP first by running the following command
```
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb-cucp.sa.conf --gNBs.[0].min_rxtxtime 6 --sa
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb-cucp.sa.f1.conf --gNBs.[0].min_rxtxtime 6 --sa
```
Note that `min_rxtxtime` should be set to `6` only when you are connecting an OAI UE to the gNB.
@@ -82,7 +99,7 @@ Note that `min_rxtxtime` should be set to `6` only when you are connecting an OA
CUUP (has its own executable):
```
sudo ./nr-cuup -O ../../../ci-scripts/conf_files/gnb-cuup.sa.conf --sa
sudo ./nr-cuup -O ../../../ci-scripts/conf_files/gnb-cuup.sa.f1.conf --sa
```
DU:
@@ -106,3 +123,25 @@ You can also run the nodes on different machines. If you do so please change the
![E1/F1/NG parameters](images/e1-archi.png){width=1200}
[PDF version](images/e1-archi.pdf) | [LaTeX/TikZ version](img/e1-archi.tex) if you want to modify to reflect your setup
# 4. Multiple CU-UP
It is possible to connect multiple CU-UP to the same CU-CP. In the handler of
the E1 Setup Request, the CU-CP verifies that the PLMN(s) (MCC, MNC) between
both nodes match, and that no CU-UP with the same ID exists. Note that the
NSSAIs for the CU-UPs can be different.
During attach, the following rules are used to select a CU-UP at the CU-CP, in
order:
- Select a CU-UP based on slice identifiers:
- If both the SST and SD match exactly, that CU-UP is selected. (If multiple
have the same NSSAI, the first is always selected.)
- Otherwise, the first CU-UP with the same SST but different SD is selected.
- Round-robin across all CU-UPs.
- The first CU-UP.
- If no CU-UP is selected, the CU-CP asserts.
Note that CU-UPs are not released from CU-CP internal structures. That means
that you have to restart the CU-CP if you want to connect the CU-UP again
(e.g., after a crash). The CU-CP might also misfunction during attach if a
CU-UP was connected, but disconnected in the meantime.
+2 -2
View File
@@ -47,8 +47,8 @@ int create_tasks_ue(uint32_t ue_nb) {
if (users == NULL) abort();
users->count = ue_nb;
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
ittiTask_parms_t parms = {users, NULL};
if (itti_create_task(TASK_NAS_UE, nas_ue_task, &parms) < 0) {
LOG_E(NAS, "Create task for NAS UE failed\n");
return -1;
}
+9 -15
View File
@@ -95,12 +95,6 @@ void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Beare
abort();
}
int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_p, int offset)
{
abort();
return 0;
}
void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_context_p, e1ap_bearer_setup_resp_t *e1ap_resp)
{
abort();
@@ -108,14 +102,14 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex
f1ap_cudu_inst_t *getCxt(instance_t instanceP)
{
abort();
return NULL;
}
NR_DRB_ToAddModList_t *fill_DRB_configList(gNB_RRC_UE_t *ue)
{
abort();
return NULL;
// the E1 module uses F1's getCxt() to decide whether there is F1-U and if
// so, what is the GTP instance. In the CU-UP, we don't start the F1 module,
// and instead, E1 handles the GTP-U endpoint. In the following, we fake the
// instance and put the right GTP-U instance number in.
const e1ap_upcp_inst_t *e1inst = getCxtE1(instanceP);
static f1ap_cudu_inst_t fake = {0};
fake.gtpInst = e1inst->gtpInstF1U;
return &fake;
}
int main(int argc, char **argv)
@@ -134,7 +128,7 @@ int main(int argc, char **argv)
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
rc = itti_create_task(TASK_CUUP_E1, E1AP_CUUP_task, NULL);
AssertFatal(rc >= 0, "Create task for CUUP E1 failed\n");
nr_pdcp_layer_init();
nr_pdcp_layer_init(true);
cu_init_f1_ue_data(); // for CU-UP/CP mapping: we use the same
MessageDef *msg = RCconfig_NR_CU_E1(true);
AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n");
+7 -9
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file lte-enb.c
/*! \file nr-gnb.c
* \brief Top-level threads for gNodeB
* \author R. Knopp, F. Kaltenberger, Navid Nikaein
* \date 2012
@@ -290,7 +290,7 @@ void rx_func(void *param)
pushTpool(&gNB->threadPool, res);
}
} else if (get_softmodem_params()->continuous_tx) {
notifiedFIFO_elt_t *res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
notifiedFIFO_elt_t *res = pullNotifiedFIFO(&gNB->L1_tx_free);
if (res == NULL)
return; // Tpool has been stopped
processingData_L1tx_t *syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
@@ -420,10 +420,8 @@ void *nrL1_stats_thread(void *param) {
// two parallel L1 tx threads.
void *tx_reorder_thread(void* param) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
notifiedFIFO_elt_t *resL1Reserve = NULL;
resL1Reserve = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
notifiedFIFO_elt_t *resL1Reserve = pullNotifiedFIFO(&gNB->L1_tx_out);
AssertFatal(resL1Reserve != NULL, "pullTpool() did not return start message in %s\n", __func__);
int next_tx_slot=((processingData_L1tx_t *)NotifiedFifoData(resL1Reserve))->slot;
@@ -436,15 +434,15 @@ void *tx_reorder_thread(void* param) {
if (((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
LOG_E(PHY,"order mistake\n");
resL1Reserve = NULL;
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
}
} else {
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
} else {
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
if (resL1 != NULL && ((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
if (resL1Reserve)
LOG_E(PHY,"error, have a stored packet, then a second one\n");
resL1Reserve = resL1;
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
if (((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot)
LOG_E(PHY,"error, pull two msg, none is good\n");
}
+9 -6
View File
@@ -80,7 +80,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "nfapi/oai_integration/vendor_ext.h"
#include "gnb_config.h"
#include "openair2/E1AP/e1ap_common.h"
#include "openair2/E1AP/e1ap_api.h"
#ifdef E2_AGENT
#include "openair2/E2AP/flexric/src/agent/e2_agent_api.h"
@@ -403,12 +402,16 @@ static int create_gNB_tasks(ngran_node_t node_type)
if (node_type == ngran_gNB_CU || node_type == ngran_gNB) {
MessageDef *msg = RCconfig_NR_CU_E1(false);
instance_t inst = 0;
createE1inst(UPtype, inst, &E1AP_SETUP_REQ(msg));
createE1inst(UPtype, inst, &E1AP_REGISTER_REQ(msg).net_config, NULL);
cuup_init_n3(inst);
itti_free(TASK_UNKNOWN, msg);
getCxtE1(inst)->same_process = true;
;
RC.nrrrc[gnb_id_start]->e1_inst = inst; // stupid instance !!!*/
/* send E1 Setup Request to RRC */
MessageDef *new_msg = itti_alloc_new_message(TASK_GNB_APP, 0, E1AP_SETUP_REQ);
E1AP_SETUP_REQ(new_msg) = E1AP_REGISTER_REQ(msg).setup_req;
new_msg->ittiMsgHeader.originInstance = -1; /* meaning, it is local */
itti_send_msg_to_task(TASK_RRC_GNB, 0 /*unused by callee*/, new_msg);
itti_free(TASK_UNKNOWN, msg);
}
//Use check on x2ap to consider the NSA scenario
@@ -562,7 +565,7 @@ void init_pdcp(void) {
LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (!NODE_IS_DU(get_node_type())) {
nr_pdcp_layer_init();
nr_pdcp_layer_init(get_node_type() == ngran_gNB_CUCP);
nr_pdcp_module_init(pdcp_initmask, 0);
}
}
+2 -1
View File
@@ -743,7 +743,8 @@ void *UE_thread(void *arg)
//this thread should be over the processing thread to keep in real time
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg;
// int tx_enabled = 0;
openair0_timestamp timestamp, writeTimestamp;
openair0_timestamp timestamp = 0;
openair0_timestamp writeTimestamp = 0;
void *rxp[NB_ANTENNAS_RX];
int start_rx_stream = 0;
fapi_nr_config_request_t *cfg = &UE->nrUE_config;
+5 -3
View File
@@ -197,7 +197,8 @@ int create_tasks_nrue(uint32_t ue_nb) {
if (ue_nb > 0) {
LOG_I(NR_RRC,"create TASK_RRC_NRUE \n");
if (itti_create_task (TASK_RRC_NRUE, rrc_nrue_task, NULL) < 0) {
const ittiTask_parms_t parmsRRC = {NULL, rrc_nrue};
if (itti_create_task(TASK_RRC_NRUE, rrc_nrue_task, &parmsRRC) < 0) {
LOG_E(NR_RRC, "Create task for RRC UE failed\n");
return -1;
}
@@ -208,7 +209,8 @@ int create_tasks_nrue(uint32_t ue_nb) {
return -1;
}
}
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
const ittiTask_parms_t parmsNAS = {NULL, nas_nrue};
if (itti_create_task(TASK_NAS_NRUE, nas_nrue_task, &parmsNAS) < 0) {
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
return -1;
}
@@ -380,7 +382,7 @@ static void init_pdcp(int ue_id) {
if (get_softmodem_params()->nsa && rlc_module_init(0) != 0) {
LOG_I(RLC, "Problem at RLC initiation \n");
}
nr_pdcp_layer_init();
nr_pdcp_layer_init(false);
nr_pdcp_module_init(pdcp_initmask, ue_id);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
+4 -4
View File
@@ -20,13 +20,13 @@
* contact@openairinterface.org
*/
/*! \file time_profiling.h
* \brief Definitions for proflling real-time scheduling
* \author
/*! \file rt_profiling.h
* \brief Definitions for proflling real-time scheduling
* \author
* \date 2022
* \version 0.1
* \company Eurecom
* \email:
* \email:
* \note
* \warning
*/
+4 -4
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file lte-softmodem-common.c
/*! \file softmodem-common.c
* \brief common code for 5G and LTE softmodem main xNB and UEs source (nr-softmodem.c, lte-softmodem.c...)
* \author Nokia BellLabs France, francois Taburet
* \date 2020
@@ -105,10 +105,10 @@ void get_common_options(uint32_t execmask) {
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC;
checkedparam_t cmdline_CheckParams[] = CMDLINE_PARAMS_CHECK_DESC;
int numparams = sizeof(cmdline_params) / sizeof(paramdef_t);
int numparams = sizeofArray(cmdline_params);
config_set_checkfunctions(cmdline_params, cmdline_CheckParams, numparams);
config_get(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t), NULL);
nfapi_index = config_paramidx_fromname(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t),"nfapi");
config_get(cmdline_params, numparams, NULL);
nfapi_index = config_paramidx_fromname(cmdline_params, numparams, "nfapi");
AssertFatal(nfapi_index >= 0,"Index for nfapi config option not found!");
nfapi_mode = config_get_processedint(&cmdline_params[nfapi_index]);
+7 -3
View File
@@ -19,13 +19,13 @@
* contact@openairinterface.org
*/
/*! \file lte-softmodem-common.h
/*! \file softmodem-common.h
* \brief Top-level threads for eNodeB
* \author
* \author
* \date 2012
* \version 0.1
* \company Eurecom
* \email:
* \email:
* \note
* \warning
*/
@@ -109,6 +109,7 @@ extern "C"
#define CONFIG_HLP_SYNC_REF "Sync Reference in Sidelink\n"
#define CONFIG_HLP_NID1 "Set NID1 value in Sidelink\n"
#define CONFIG_HLP_NID2 "Set NID2 value in Sidelink\n"
#define CONFIG_HLP_NOITTI "Do not start itti threads, call queue processing in place, inside the caller thread"
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to eNodeB and UE */
@@ -190,6 +191,7 @@ extern int usrp_tx_thread;
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
{"nid1", CONFIG_HLP_NID1, 0, .iptr=&NID1, .defintval=10, TYPE_INT, 0}, \
{"nid2", CONFIG_HLP_NID2, 0, .iptr=&NID2, .defintval=1, TYPE_INT, 0}, \
{"no-itti-threads", CONFIG_HLP_NOITTI, PARAMFLAG_BOOL, .iptr=&softmodem_params.no_itti, .defintval=0, TYPE_INT, 0}, \
}
// clang-format on
@@ -238,6 +240,7 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
// clang-format on
@@ -349,6 +352,7 @@ typedef struct {
int sync_ref;
int nid1;
int nid2;
int no_itti;
} softmodem_params_t;
extern uint64_t get_softmodem_optmask(void);
+1 -1
View File
@@ -1112,7 +1112,7 @@ notifiedFIFO_elt_t *l1tx_message_extract(PHY_VARS_gNB *gNB, int frame, int slot)
notifiedFIFO_elt_t *res;
//TODO: This needs to be reworked for nfapi to work
res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
res = pullNotifiedFIFO(&gNB->L1_tx_free);
return res;
}
-2
View File
@@ -246,5 +246,3 @@ main() {
printf("\n");
}
#endif
/** @}*/
-2
View File
@@ -325,5 +325,3 @@ main() {
printf("\n");
}
#endif
/** @}*/
+1 -1
View File
@@ -504,5 +504,5 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
decoder_if_t phy_threegpplte_turbo_decoder;
decoder_if_t phy_threegpplte_turbo_decoder8;
decoder_if_t phy_threegpplte_turbo_decoder16;
/** @} */
#endif
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file openair1/PHY/CODING
/*! \file coding_load.c
* \brief: load library implementing coding/decoding algorithms
* \author Francois TABURET
* \date 2017
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*!\file ldpc_encoder2.c
/*! \file ldpc_encoder_optim.c
* \brief Defines the optimized LDPC encoder
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
* \email openair_tech@eurecom.fr
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*!\file ldpc_encoder2.c
/*! \file ldpc_encoder_optim8seg.c
* \brief Defines the optimized LDPC encoder
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
* \email openair_tech@eurecom.fr
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*!\file ldpc_encoder2.c
/*! \file ldpc_encoder_optim8segmulti.c
* \brief Defines the optimized LDPC encoder
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
* \email openair_tech@eurecom.fr
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file openair1/PHY/CODING/coding_nr_load.c
/*! \file nrLDPC_load.c
* \brief: load library implementing coding/decoding algorithms
* \author Francois TABURET
* \date 2020
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*!\file PHY/CODING/nrPolar_tools/nr_polar_procedures.h
/*! \file nr_polar_procedures.c
* \brief
* \author Turker Yilmaz
* \date 2018
@@ -129,17 +129,13 @@ void nr_polar_uxG(uint64_t *D, const uint64_t *u, const uint64_t **G_N_tab, uint
int n_ones = 0;
for (int a = 0; a < N_array; a++) {
uint64_t uxG = u[a] & Gn[a];
for (int m = 0; m < 64; m++) {
if (((uxG >> m) & 1) == 1) {
n_ones++;
}
}
if (uxG != 0)
n_ones += count_bits_set(uxG);
}
uint64_t bit = n_ones % 2;
int n1 = n >> 6;
int n2 = n - (n1 << 6);
D[n1] |= bit << n2;
D[n1] |= ((uint64_t)n_ones & 1) << n2;
}
}
@@ -396,9 +392,9 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp,
uint16_t E)
{
uint8_t i;
uint16_t *d, *y, ind;
uint16_t *d, ind;
d = (uint16_t *)malloc(sizeof(uint16_t) * N);
y = (uint16_t *)malloc(sizeof(uint16_t) * N);
uint16_t* y = calloc(N, sizeof(uint16_t));
for (int m=0; m<=N-1; m++) d[m]=m;
@@ -416,11 +412,11 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp,
} else {
if ( (K/(double)E) <= (7.0/16) ) { //puncturing
for (int k=0; k<=E-1; k++) {
rmp[k]=y[k+N-E];
rmp[k]=y[k+N-E];
}
} else { //shortening
for (int k=0; k<=E-1; k++) {
rmp[k]=y[k];
rmp[k]=y[k];
}
}
}
+2 -2
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*!\file PHY/CODING/nr_polar_init.h
/*! \file nr_polar_init.c
* \brief
* \author Turker Yilmaz, Raymond Knopp
* \date 2018
@@ -28,7 +28,7 @@
* \email turker.yilmaz@eurecom.fr, raymond.knopp@eurecom.fr
* \note
* \warning
*/
*/
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
#include "PHY/NR_TRANSPORT/nr_dci.h"
+1
View File
@@ -151,6 +151,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
frame_parms->ofdm_symbol_size = 256*osf;
frame_parms->samples_per_tti = 3840*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90;
AssertFatal(log2_osf < 4 ,"log2_osf %d will cause undefined behaviour \n", log2_osf);
frame_parms->nb_prefix_samples>>=(3-log2_osf);
frame_parms->nb_prefix_samples0>>=(3-log2_osf);
frame_parms->N_RBGS = 2;
+14 -6
View File
@@ -42,7 +42,7 @@
*/
/*!
\fn int l1_top_init_eNB(void)
\fn l1_north_init_eNB
\brief Initialize north interface for L1
@returns 0 on success
*/
@@ -74,9 +74,9 @@ int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue,
/*!
\brief Allocate and initialize the PHY variables releated to the transport channel buffers (UL/DL)
@param ue Pointer to UE L1 context
@param abstraction flag Indicates that abstraction is used in L1
@param abstraction_flag Indicates that abstraction is used in L1
*/
void init_lte_ue_transport(PHY_VARS_UE *ue,int absraction_flag);
void init_lte_ue_transport(PHY_VARS_UE *ue, int abstraction_flag);
/*!
\brief Allocate and initialize the PHY variables relevant to the LTE implementation (eNB).
@@ -99,14 +99,20 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNb,
*/
void phy_free_lte_eNB(PHY_VARS_eNB *phy_vars_eNb);
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB decoding + primary/secondary synch).
\details The basically allows configuration of \f$N_{\mathrm{RB}}^{\mathrm{DL}}\f$, the cell id \f$N_{\mathrm{ID}}^{\mathrm{cell}}\f$, the normal/extended prefix mode, the frame type (FDD/TDD), \f$N_{\mathrm{cp}}\f$, the number of TX antennas at eNB (\f$p\f$) and the number of PHICH groups, \f$N_{\mathrm{group}}^{\mathrm{PHICH}}\f$
@param lte_frame_parms pointer to LTE parameter structure
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB decoding + primary/secondary
synch). \details The basically allows configuration of \f$N_{\mathrm{RB}}^{\mathrm{DL}}\f$, the cell id
\f$N_{\mathrm{ID}}^{\mathrm{cell}}\f$, the normal/extended prefix mode, the frame type (FDD/TDD), \f$N_{\mathrm{cp}}\f$, the number
of TX antennas at eNB (\f$p\f$) and the number of PHICH groups, \f$N_{\mathrm{group}}^{\mathrm{PHICH}}\f$
@param Mod_id
@param CC_id
@param eutra_band
@param N_RB_DL Number of DL resource blocks
@param Nid_cell Cell ID
@param Ncp Normal/Extended Prefix flag
@param p_eNB Number of eNB TX antennas
@param phich_config Pointer to PHICH_CONFIG_COMMON
@param dl_CarrierFreq
@param ul_CarrierFreq
*/
void phy_config_mib_eNB(int Mod_id,
int CC_id,
@@ -296,6 +302,7 @@ void phy_config_sib13_eNB(module_id_t Mod_id,
@param index index of the node
@param cba_rnti rnti for the cba transmission
@param num_active_cba_groups num active cba group
@param cba_group_id
*/
void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups);
@@ -390,5 +397,6 @@ void phy_config_update_sib13_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);
void fill_subframe_mask(PHY_VARS_eNB *eNB);
/** @}*/
#endif
+2 -7
View File
@@ -32,13 +32,6 @@
/*!\brief Timing drift hysterisis in samples*/
#define SYNCH_HYST 2
/*!
\brief This function is used for time-frequency scanning prior to complete cell search. It scans
over the entire LTE band for maximum correlation and keeps the 10 best scores and the correspoding frequency offset (5 kHz granularity) for each of the 3 PSS sequences.
\param ue Pointer to UE variables
\param band index of lte band
\param DL_freq Central RF Frequency in Hz
*/
/*!
\brief This function allocates memory needed for the synchronization.
\param frame_parms LTE DL frame parameter structure
@@ -151,6 +144,7 @@ This function computes the time domain channel response, finds the peak and adju
\param frame_parms LTE DL frame parameter structure
\param phy_vars_ue Pointer to UE PHY data structure
\param eNb_id
\param subframe
\param clear If clear==1 moving average filter is reset
\param coef Coefficient of the moving average filter (Q1.15)
*/
@@ -181,6 +175,7 @@ void lte_ue_measurements_emul(PHY_VARS_UE *phy_vars_ue,
/*! \brief Function to return the path-loss based on the UE cell-specific reference signal strength and transmission power of eNB
@param Mod_id Module ID for UE
@param CC_id
@param eNB_index Index of eNB on which to act
@returns Path loss in dB
*/
+2 -5
View File
@@ -118,10 +118,8 @@ void lte_sync_time_free(void) {
#define SHIFT 17
int lte_sync_time(int **rxdata, ///rx data in time domain
LTE_DL_FRAME_PARMS *frame_parms,
int *eNB_id) {
int lte_sync_time(int **rxdata, LTE_DL_FRAME_PARMS *frame_parms, int *eNB_id)
{
// perform a time domain correlation using the oversampled sync sequence
unsigned int n, ar, s, peak_pos, peak_val, sync_source;
struct complexd sync_out[3]= {{0}}, sync_out2[3]= {{0}};
@@ -168,7 +166,6 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
return(peak_pos);
}
int ru_sync_time_init(RU_t *ru) { // LTE_UE_COMMON *common_vars
/*
int16_t dmrs[2048];
+11 -10
View File
@@ -1,16 +1,16 @@
/*******************************************************************************
*******************************************************************************/
/*! \file PHY/LTE_REFSIG/defs_NB_IoT.c
* \function called by lte_dl_cell_spec_NB_IoT.c , TS 36-211, V13.4.0 2017-02
* \author M. KANJ
* \date 2017
* \version 0.0
* \company bcom
* \email: matthieu.kanj@b-com.com
* \note
* \warning
*/
/*! \file defs_NB_IoT.h
* \function called by lte_dl_cell_spec_NB_IoT.c , TS 36-211, V13.4.0 2017-02
* \author M. KANJ
* \date 2017
* \version 0.0
* \company bcom
* \email: matthieu.kanj@b-com.com
* \note
* \warning
*/
/* Definitions for NB_IoT Reference signals */
@@ -58,3 +58,4 @@ void generate_ul_ref_sigs_rx_NB_IoT(void);
void free_ul_ref_sigs_NB_IoT(void);
#endif
/** @}*/
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_REFSIG/lte_dl_ue_spec.c
* \brief Top-level routines for generating UE-specific Reference signals from 36-211, V11.3.0 2013-06
* \author R. Knopp X. Jiang
* \date 2015
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr xiwen.jiang@eurecom.fr
* \note
* \warning
*/
/*! \file lte_dl_uespec.c
* \brief Top-level routines for generating UE-specific Reference signals from 36-211, V11.3.0 2013-06
* \author R. Knopp X. Jiang
* \date 2015
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr xiwen.jiang@eurecom.fr
* \note
* \warning
*/
#include <stdio.h>
#include <stdlib.h>
+1
View File
@@ -186,3 +186,4 @@ int lte_generate_srs(int32_t **txdataF,
#endif
/** @}*/
@@ -1065,8 +1065,8 @@ int allocate_REs_in_RB_pilots_QPSK_tm2(PHY_VARS_eNB* phy_vars_eNB,
first_re=6;
re=first_re;
x0p=&x0[*jj];
uint64_t tmp0[4];
uint64_t tmp1[4];
uint64_t tmp0[4] = {0};
uint64_t tmp1[4] = {0};
qam4_table_offset=(((uint32_t)x0p[0]))|
(((uint32_t)x0p[1])<<1)|
@@ -1338,8 +1338,8 @@ int allocate_REs_in_RB_pilots_16QAM_tm2(PHY_VARS_eNB* phy_vars_eNB,
first_re=6;
re=first_re;
x0p=&x0[*jj];
uint64_t tmp0[4];
uint64_t tmp1[4];
uint64_t tmp0[4] = {0};
uint64_t tmp1[4] = {0};
qam16_table_offset=(((uint32_t)x0p[0])<<1)|(((uint32_t)x0p[2]))|
(((uint32_t)x0p[1])<<3)|(((uint32_t)x0p[3])<<2) |
@@ -1503,8 +1503,8 @@ int allocate_REs_in_RB_pilots_64QAM_tm2(PHY_VARS_eNB* phy_vars_eNB,
x0p=&x0[*jj];
uint64_t tmp0[4];
uint64_t tmp1[4];
uint64_t tmp0[4] = {0};
uint64_t tmp1[4] = {0};
// 12-bits corresponds to 2 64QAM symbols input which generates 2 64QAM symbols on 2 TX antenna ports
qam64_table_offset=(((uint32_t)x0p[0])<<2)|(((uint32_t)x0p[2])<<1)|(((uint32_t)x0p[4]))|
@@ -1691,7 +1691,8 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int16_t re_off=re_offset;
uint8_t first_re,last_re;
int32_t tmp_sample1,tmp_sample2;
int32_t tmp_sample1 = 0;
int32_t tmp_sample2 = 0;
int16_t tmp_amp=amp;
int s=1;
int mprime2 = mprime,ind,ind_dword,ind_qpsk_symb;
@@ -76,12 +76,4 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t subframe);
void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t prach_ConfigIndex,
uint8_t zeroCorrelationZoneConfig,
uint8_t highSpeedFlag,
frame_type_t frame_type,
uint32_t X_u[64][839]);
#endif
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/proto.h
/*! \file proto_NB_IoT.h
* \brief Function prototypes for PHY physical/transport channel processing and generation V8.6 2009-03
* \author R. Knopp, F. Kaltenberger
* \date 2011
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/transport_commont.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX) common to both eNB/UE
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file transport_common.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX) common to both eNB/UE
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __TRANSPORT_COMMON__H__
#define __TRANSPORT_COMMON__H__
#include "PHY/defs_common.h"
@@ -55,7 +55,7 @@ uint8_t get_I_TBS(uint8_t I_MCS);
unsigned char get_I_TBS_UL(unsigned char I_MCS);
/** \brief Compute Q (modulation order) based on downlink I_MCS. Implements table 7.1.7.1-1 from 36.213.
@param I_MCS
@param mcs
@param nb_rb
@return Transport block size */
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
@@ -63,7 +63,7 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
uint16_t find_nb_rb_DL(uint8_t mcs, uint32_t bytes, uint16_t nb_rb_max, uint16_t rb_gran);
/** \brief Compute Q (modulation order) based on uplink I_MCS. Implements table 7.1.7.1-1 from 36.213.
@param I_MCS
@param mcs
@param nb_rb
@return Transport block size */
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb);
@@ -212,45 +212,16 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t sub
/*!
\brief Helper for MAC, returns number of available PRACH in TDD for a particular configuration index
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
@returns 0-5 depending on number of available prach
*/
uint8_t get_num_prach_tdd(module_id_t Mod_id);
/*!
\brief Return the PRACH format as a function of the Configuration Index and Frame type.
@param prach_ConfigIndex PRACH Configuration Index
@param frame_type 0-FDD, 1-TDD
@returns 0-1 accordingly
*/
/*
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,frame_type_t frame_type);
*/
/*!
\brief Helper for MAC, returns frequency index of PRACH resource in TDD for a particular configuration index
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
@returns 0-5 depending on number of available prach
*/
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
/*!
\brief Comp ute DFT of PRACH ZC sequences. Used for generation of prach in UE and reception of PRACH in eNB.
@param rootSequenceIndex PRACH root sequence
#param prach_ConfigIndex PRACH Configuration Index
@param zeroCorrelationZoneConfig PRACH ncs_config
@param highSpeedFlat PRACH High-Speed Flag
@param frame_type TDD/FDD flag
@param Xu DFT output
*/
void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t prach_ConfigIndex,
uint8_t zeroCorrelationZoneConfig,
uint8_t highSpeedFlag,
frame_type_t frame_type,
uint32_t X_u[64][839]);
void init_prach_tables(int N_ZC);
/*!
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/defs.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file transport_eNB.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __TRANSPORT_ENB__H__
#define __TRANSPORT_ENB__H__
#include "transport_common.h"
+5 -16
View File
@@ -306,39 +306,29 @@ int mch_modulation_khz_1dot25(int32_t **txdataF,
LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_DLSCH_t *dlsch);
/** \brief Top-level generation function for eNB TX of MBSFN
@param phy_vars_eNB Pointer to eNB variables
@param proc
@param a Pointer to transport block
@param abstraction_flag
*/
void generate_mch_khz_1dot25(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc,uint8_t *a);
/** \brief Top-level generation function for eNB TX of MBSFN
@param phy_vars_eNB Pointer to eNB variables
@param proc
@param a Pointer to transport block
@param abstraction_flag
*/
void generate_mch(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc,uint8_t *a);
/** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_eNB Pointer to eNB variables
@param proc Pointer to RXn-TXnp4 proc information
@param mcs MCS for MBSFN
@param ndi new data indicator
@param rdvix
@param rvidx
*/
void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx);
/** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_ue Pointer to UE variables
@param mcs MCS for MBSFN
@param eNB_id index of eNB in ue variables
*/
/** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
for N subframes.
@param phy_vars_eNB Pointer to eNB variables
@@ -426,7 +416,7 @@ void dci_encoding(uint8_t *a,
uint16_t rnti);
/*! \brief Top-level DCI entry point. This routine codes an set of DCI PDUs and performs PDCCH modulation, interleaving and mapping.
\param num_dci Number of pdcch symbols
\param num_pdcch_symbols
\param num_dci Number of DCI pdus to encode
\param dci_alloc Allocation vectors for each DCI pdu
\param n_rnti n_RNTI (see )
@@ -525,7 +515,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
@param phy_vars_eNB Pointer to eNB top-level descriptor
@param proc Pointer to RXTX proc variables
@param UE_id ID of UE transmitting this PUSCH
@param subframe Index of subframe for PUSCH
@param control_only_flag Receive PUSCH with control information only
@param Nbundled Nbundled parameter for ACK/NAK scrambling from 36-212/36-213
@param llr8_flag If 1, indicate that the 8-bit turbo decoder should be used
@@ -584,7 +573,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
int br_flag
);
/*!
\brief Process PRACH waveform
@param phy_vars_eNB Pointer to eNB top-level descriptor. If NULL, then this is an RRU
@@ -592,6 +580,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
@param max_preamble most likely preamble
@param max_preamble_energy Estimated Energy of most likely preamble
@param max_preamble_delay Estimated Delay of most likely preamble
@param avg_preamble_energy
@param Nf System frame number
@param tdd_mapindex Index of PRACH resource in Table 5.7.1-4 (TDD)
@param br_flag indicator to act on eMTC PRACH
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/drs_modulation.c
* \brief Top-level routines for generating the Demodulation Reference Signals from 36-211, V8.6 2009-03
* \author R. Knopp, F. Kaltenberger, A. Bhamri
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,ankit.bhamri@eurecom.fr
* \note
* \warning
*/
/*! \file drs_modulation.c
* \brief Top-level routines for generating the Demodulation Reference Signals from 36-211, V8.6 2009-03
* \author R. Knopp, F. Kaltenberger, A. Bhamri
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,ankit.bhamri@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/sse_intrin.h"
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/srs_modulation.c
* \brief Top-level routines for generating sounding reference signal (SRS) V8.6 2009-03
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr, florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
/*! \file srs_modulation.c
* \brief Top-level routines for generating sounding reference signal (SRS) V8.6 2009-03
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr, florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
@@ -101,18 +101,6 @@ void qpsk_qpsk(int16_t *stream0_in,
int16_t *rho01,
int32_t length);
/** \brief This function perform LLR computation for dual-stream (QPSK/QPSK) transmission.
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param llr128p pointer to pointer to symbol in dlsch_llr*/
void qpsk_llr(int16_t *stream0_in,
int16_t *stream0_out,
int length);
@@ -158,6 +146,7 @@ void qpsk_qam16(int16_t *stream0_in,
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param rho_i Correlation between channel of signal and inteference
@param dl_ch_mag_i
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@@ -194,6 +183,7 @@ void qpsk_qam64(int16_t *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param dl_ch_mag_i
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@@ -231,13 +221,13 @@ void qam16_qpsk(short *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
int dlsch_16qam_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
@@ -271,14 +261,14 @@ void qam16_qam16(short *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
int dlsch_16qam_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
@@ -313,14 +303,14 @@ void qam16_qam64(short *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
int dlsch_16qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
@@ -353,13 +343,13 @@ void qam64_qpsk(short *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
int dlsch_64qam_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
@@ -409,14 +399,14 @@ void qam64_qam16_avx2(short *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
int dlsch_64qam_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
@@ -467,15 +457,16 @@ void qam64_qam64_avx2(int32_t *stream0_in,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param rxdataF_comp_i Compensated channel output for interference
@param ch_mag Input from scaled channel magnitude square of h0'*g0
@param ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param dl_ch_mag Input from scaled channel magnitude square of h0'*g0
@param dl_ch_mag_i Input from scaled channel magnitude square of h0'*g1
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param llr16p pointer to pointer to symbol in dlsch_llr*/
@param pbch_pss_sss_adjust Number of channel bits taken by PBCH/PSS/SSS
@param llr_offset
*/
int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp,
int **rxdataF_comp_i,
@@ -490,7 +481,6 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
//short **llr16p,
uint32_t llr_offset);
/** \brief This function generates log-likelihood ratios (decoder input) for single-stream QPSK received waveforms.
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@@ -499,7 +489,6 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
@param first_symbol_flag
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param llr128p pointer to pointer to symbol in dlsch_llr
@param beamforming_mode beamforming mode
*/
int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
@@ -514,16 +503,6 @@ int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
/**
\brief This function generates log-likelihood ratios (decoder input) for single-stream 16QAM received waveforms
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param dlsch_llr llr output
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation and weighted for mid-point in 16QAM constellation
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adjust Adjustment factor in RE for PBCH/PSS/SSS allocations
@param llr128p pointer to pointer to symbol in dlsch_llr
@param beamforming_mode beamforming mode
*/
int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
@@ -551,14 +530,16 @@ void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
\brief This function generates log-likelihood ratios (decoder input) for single-stream 16QAM received waveforms
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param sic_buffer
@param rho_i
@param num_pdcch_symbols
@param dlsch_llr llr output
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by first mid-point of 64-QAM constellation
@param dl_ch_magb Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by second mid-point of 64-QAM constellation
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by first
mid-point of 64-QAM constellation
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adjust PBCH/PSS/SSS RE adjustment (in REs)
@param beamforming_mode beamforming mode
@param subframe
@param mod_order_0
@param rb_alloc
*/
void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp,
@@ -1021,9 +1002,10 @@ void dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
@param dlsch_llr Pointer to LLR values computed by dlsch_demodulation
@param lte_frame_parms Pointer to frame descriptor
@param dlsch Pointer to DLSCH descriptor
@param harq_process
@param frame Frame number
@param subframe Subframe number
@param num_pdcch_symbols Number of PDCCH symbols
@param harq_pid
@param is_crnti indicates if PDSCH belongs to a CRNTI (necessary for parallelizing decoding threads)
@param llr8_flag If 1, indicate that the 8-bit turbo decoder should be used
@returns 0 on success, 1 on unsuccessful decoding
@@ -1045,7 +1027,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
PDSCH_t dlsch_id,
uint8_t eNB_id);
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel estimation. It performs
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel
estimation. It performs
- RB extraction (signal and channel estimates)
- channel compensation (matched filtering)
- RE extraction (pilot, PBCH, synch. signals)
@@ -1056,11 +1039,17 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
@param type Type of PDSCH (SI_PDSCH,RA_PDSCH,PDSCH,PMCH)
@param eNB_id eNb index (Nid1) 0,1,2
@param eNB_id_i Interfering eNB index (Nid1) 0,1,2, or 3 in case of MU-MIMO IC receiver
@param frame
@param subframe Subframe number
@param symbol Symbol on which to act (within sub-frame)
@param first_symbol_flag set to 1 on first DLSCH symbol
@param rx_type. rx_type=RX_IC_single_stream will enable interference cancellation of a second stream when decoding the first stream. In case of TM1, 2, 5, and this can cancel interference from a neighbouring cell given by eNB_id_i. In case of TM5, eNB_id_i should be set to n_connected_eNB to perform multi-user interference cancellation. In case of TM3, eNB_id_i should be set to eNB_id to perform co-channel interference cancellation; this option should be used together with an interference cancellation step [...]. In case of TM3, if rx_type=RX_IC_dual_stream, both streams will be decoded by applying the IC single stream receiver twice.
@param rx_type rx_type=RX_IC_single_stream will enable interference cancellation of a second stream when decoding the first
stream. In case of TM1, 2, 5, and this can cancel interference from a neighbouring cell given by eNB_id_i. In case of TM5, eNB_id_i
should be set to n_connected_eNB to perform multi-user interference cancellation. In case of TM3, eNB_id_i should be set to eNB_id
to perform co-channel interference cancellation; this option should be used together with an interference cancellation step [...].
In case of TM3, if rx_type=RX_IC_dual_stream, both streams will be decoded by applying the IC single stream receiver twice.
@param i_mod Modulation order of the interfering stream
@param harq_pid
*/
int32_t rx_pdsch(PHY_VARS_UE *phy_vars_ue,
PDSCH_t type,
@@ -1085,6 +1074,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
@param phy_vars_ue Pointer to UE variables
@param[out] pss_ext contain the PSS signals after the extraction
@param[out] sss_ext contain the SSS signals after the extraction
@param subframe
@returns 0 on success
*/
int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
@@ -1095,6 +1085,7 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
/*! \brief Extract only PSS resource elements
@param phy_vars_ue Pointer to UE variables
@param[out] pss_ext contain the PSS signals after the extraction
@param subframe
@returns 0 on success
*/
int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
@@ -1104,6 +1095,7 @@ int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
/*! \brief Extract only SSS resource elements
@param phy_vars_ue Pointer to UE variables
@param[out] sss_ext contain the SSS signals after the extraction
@param subframe
@returns 0 on success
*/
int sss_only_extract(PHY_VARS_UE *phy_vars_ue,
@@ -1179,7 +1171,7 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
/*! \brief Top-level generation route for Sidelink Shared Channel
\param ue pointer to UE descriptor
\param slsch pointer to SLSCH configuration and payload
\param slss pointer to SLSCH configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
@@ -1261,13 +1253,13 @@ uint8_t get_I_TBS(uint8_t I_MCS);
unsigned char get_I_TBS_UL(unsigned char I_MCS);
/** \brief Compute Q (modulation order) based on downlink I_MCS. Implements table 7.1.7.1-1 from 36.213.
@param I_MCS
@param mcs
@param nb_rb
@return Transport block size */
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
/** \brief Compute Q (modulation order) based on uplink I_MCS. Implements table 7.1.7.1-1 from 36.213.
@param I_MCS
@param mcs
@param nb_rb
@return Transport block size */
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb);
@@ -1321,10 +1313,13 @@ uint8_t I_TBS2I_MCS(uint8_t I_TBS);
uint8_t SE2I_TBS(float SE,
uint8_t N_PRB,
uint8_t symbPerRB);
/** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 36.211 v8.6.0. If IFFT_FPGA is defined, the SRS is quantized to a QPSK sequence.
/** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 36.211 v8.6.0. If IFFT_FPGA is
defined, the SRS is quantized to a QPSK sequence.
@param frame_parms LTE DL Frame Parameters
@param soundingrs_ul_config_dedicated Dynamic configuration from RRC during Connection Establishment
@param txdataF pointer to the frequency domain TX signal
@param amp
@param subframe
@returns 0 on success*/
int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
@@ -1361,13 +1356,6 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
unsigned int nb_rb,
uint8_t ant);
/*!
\brief This function initializes the Group Hopping, Sequence Hopping and nPRS sequences for PUCCH/PUSCH according to 36.211 v8.6.0. It should be called after configuration of UE (reception of SIB2/3) and initial configuration of eNB (or after reconfiguration of cell-specific parameters).
@param frame_parms Pointer to a LTE_DL_FRAME_PARMS structure (eNB or UE)*/
void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
/*!
\brief This function implements the initialization of paging parameters for UE (See Section 7, 36.304).It must be called after setting IMSImod1024 during UE startup and after receiving SIB2
@param ue Pointer to UE context
@@ -1464,16 +1452,17 @@ void generate_RIV_tables(void);
N_RB_DL, PHICH_CONFIG and Nid_cell) and the UE can begin decoding PDCCH and DLSCH SI to retrieve the rest. Once these
parameters are know, the routine calls some basic initialization routines (cell-specific reference signals, etc.)
@param phy_vars_ue Pointer to UE variables
@param mode
*/
int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode);
/*!
\brief Encoding of PUSCH/ACK/RI/ACK from 36-212.
@param a Pointer to ulsch SDU
@param frame_parms Pointer to Frame parameters
@param ulsch Pointer to ulsch descriptor
@param phy_vars_ue
@param harq_pid HARQ process ID
@param eNB_id
@param subframe_rx
@param tmode Transmission mode (1-7)
@param control_only_flag Generate PUSCH with control information only
@param Nbundled Parameter for ACK/NAK bundling (36.213 Section 7.3)
@@ -1630,44 +1619,40 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t sub
@param phy_vars_ue Pointer to ue top-level descriptor
@param eNB_id Index of destination eNB
@param subframe subframe index to operate on
@param index of preamble (0-63)
@param Nf System frame number
@returns 0 on success
*/
int32_t generate_prach(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,uint16_t Nf);
/*!
\brief Helper for MAC, returns number of available PRACH in TDD for a particular configuration index
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
@returns 0-5 depending on number of available prach
*/
uint8_t get_num_prach_tdd(module_id_t Mod_id);
/*!
\brief Return the PRACH format as a function of the Configuration Index and Frame type.
@param prach_ConfigIndex PRACH Configuration Index
@param frame_type 0-FDD, 1-TDD
\brief Return the PRACH format as a function of the Configuration Index and Frame type
@param prach_ConfigIndex Configuration Index
@param frame_type 0-FDD 1-TDD
@returns 0-1 accordingly
*/
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,frame_type_t frame_type);
/*!
\brief Helper for MAC, returns frequency index of PRACH resource in TDD for a particular configuration index
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
\brief Helper for MAC returns frequency index of PRACH resource in TDD for a particular configuration index
@returns 0-5 depending on number of available prach
*/
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
/*!
\brief Comp ute DFT of PRACH ZC sequences. Used for generation of prach in UE and reception of PRACH in eNB.
\brief Comp ute DFT of PRACH ZC sequences. Used for generation of prach in UE and reception of PRACH in eNB
@param rootSequenceIndex PRACH root sequence
#param prach_ConfigIndex PRACH Configuration Index
@param prach_ConfigIndex PRACH Configuration Index
@param zeroCorrelationZoneConfig PRACH ncs_config
@param highSpeedFlat PRACH High-Speed Flag
@param frame_type TDD/FDD flag
@param Xu DFT output
@param highSpeedFlag PRACH High-Speed Flag
@param frame_type TDD-FDD flag
@param X_u DFT output
*/
void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t prach_ConfigIndex,
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/defs.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file transport_ue.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __TRANSPORT_UE__H__
#define __TRANSPORT_UE__H__
#include "PHY/defs_UE.h"
+9 -10
View File
@@ -28,16 +28,15 @@
*/
/**
\fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype)
This function performs OFDM modulation with cyclic extension or zero-padding.
@param input The sequence input samples in the frequency-domain. This is a concatenation of the input symbols in SIMD redundant format
@param output The time-domain output signal
@param fftsize size of OFDM symbol size (\f$N_d\f$)
@param nb_symbols The number of OFDM symbols in the block
@param nb_prefix_samples The number of prefix/suffix/zero samples
@param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS)
\fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t
etype) This function performs OFDM modulation with cyclic extension or zero-padding
@param input The sequence input samples in the frequency-domain This is a concatenation of the input symbols in SIMD redundant
format
@param output The time-domain output signal
@param fftsize size of OFDM symbol size (\f$N_d\f$)
@param nb_symbols The number of OFDM symbols in the block
@param nb_prefix_samples The number of prefix/suffix/zero samples
@param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS)
*/
void PHY_ofdm_mod(int *input,
int *output,
+6 -7
View File
@@ -44,7 +44,6 @@ void remove_7_5_kHz(RU_t *ru,uint8_t subframe);
after beamforming
@param beam_weights Beamforming weights applied on each
antenna element and each carrier
@param slot Slot number
@param symbol Symbol index on which to act
@param aa physical antenna index
@param p logical antenna index
@@ -58,18 +57,18 @@ int beam_precoding(int32_t **txdataF,
int aa,
int p,
int l1_id);
/** \brief This function performs beamforming precoding for common
* data for only one eNB, fdragon
@param txdataF Table of pointers for frequency-domain TX signals
@param txdataF_BF Table of pointers for frequency-domain TX signals
@param frame_parms Frame descriptor structure
after beamforming
@param beam_weights Beamforming weights applied on each
antenna element and each carrier
@param slot Slot number
@param symbol Symbol index on which to act
@param aa physical antenna index*/
@param subframe sf number
@param nb_antenna_ports physical antennas
@param nb_tx
@param frame_parms
*/
int beam_precoding_one_eNB(int32_t **txdataF,
int32_t **txdataF_BF,
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15],
@@ -28,16 +28,17 @@
* @{
*/
/*!
\brief This function performs channel estimation including frequency interpolation
\param gNB Pointer to gNB PHY variables
\param Ns slot number (0..19)
\param p
\param symbol symbol within slot
\param bwp_start_subcarrier, first allocated subcarrier
\param nb_rb_pusch, number of allocated RBs for this UE
\param ul_id
\param bwp_start_subcarrier first allocated subcarrier
\param pusch_pdu
\param max_ch maximum value of estimated channel
\param nvar
*/
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
@@ -95,3 +96,4 @@ void nr_freq_equalization(NR_DL_FRAME_PARMS *frame_parms,
void nr_init_fde(void);
#endif
/** @}*/
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_REFSIG/nr_dl_dmrs.c
/*! \file nr_dmrs_rx.c
* \brief Top-level routines for generating DMRS from 38-211
* \author
* \date 2018
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/dlsch_decoding.c
* \brief Top-level routines for transmission of the PDSCH 38211 v 15.2.0
* \author Guy De Souza
* \date 2018
* \version 0.1
* \company Eurecom
* \email: desouza@eurecom.fr
* \note
* \warning
*/
/*! \file nr_dlsch.c
* \brief Top-level routines for transmission of the PDSCH 38211 v 15.2.0
* \author Guy De Souza
* \date 2018
* \version 0.1
* \company Eurecom
* \email: desouza@eurecom.fr
* \note
* \warning
*/
#include "nr_dlsch.h"
#include "nr_dci.h"
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/defs.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file nr_dlsch.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __NR_DLSCH__H
#define __NR_DLSCH__H
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/nr_transport_proto.h.c
* \brief Function prototypes for PHY physical/transport channel processing and generation
* \author Ahmed Hussein
* \date 2019
* \version 0.1
* \company Fraunhofer IIS
* \email: ahmed.hussein@iis.fraunhofer.de
* \note
* \warning
*/
/*! \file nr_transport_proto.h
* \brief Function prototypes for PHY physical/transport channel processing and generation
* \author Ahmed Hussein
* \date 2019
* \version 0.1
* \company Fraunhofer IIS
* \email: ahmed.hussein@iis.fraunhofer.de
* \note
* \warning
*/
#ifndef __NR_TRANSPORT__H__
#define __NR_TRANSPORT__H__
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/nr_dci_tools_common.c
/*! \file nr_uci_tools_common.c
* \brief
* \author
* \date 2020
@@ -46,10 +46,6 @@ void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t
/*!
\brief This function performs channel estimation including frequency and temporal interpolation
\param ue Pointer to UE PHY variables
\param gNB_id Index of target gNB
\param Ns slot number (0..19)
\param symbol symbol within slot
*/
void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
@@ -141,5 +137,5 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
NR_UE_DLSCH_t dlsch[2]);
float_t get_nr_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t gNB_index);
/** @}*/
#endif
+1 -1
View File
@@ -327,7 +327,7 @@ void cic_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, in
}
/* get working buffers */
buffer_one = malloc(length*sizeof(int32_t) * 2); /* for i&q samples */
buffer_one = calloc(length, sizeof(int32_t) * 2); /* for i&q samples */
if (buffer_one == NULL) {
msg("Fatal memory allocation problem \n");
assert(0);
+2 -4
View File
@@ -608,8 +608,6 @@ int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue,
uint32_t *precoded_sinr_dB) {
const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
memset(i1,0,3*sizeof(uint8_t));
i2[0] = 0;
// i1 is a three-element vector in the form of [i11 i12 i13], when CodebookType is specified as 'Type1SinglePanel'.
// Note that i13 is not applicable when the number of transmission layers is one of {1, 5, 6, 7, 8}.
@@ -904,8 +902,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t
uint8_t rank_indicator = 0;
uint32_t precoded_sinr_dB = 0;
uint8_t cqi = 0;
uint8_t i1[3];
uint8_t i2[1];
uint8_t i1[3] = {0};
uint8_t i2[1] = {0};
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params = convert_csirs_pdu(csirs_config_pdu);
nr_generate_csi_rs(frame_parms,
ue->nr_csi_info->csi_rs_generated_signal,
+3 -7
View File
@@ -19,13 +19,9 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/dci_nr.c
* \brief Implements PDCCH physical channel TX/RX procedures (36.211) and DCI encoding/decoding (36.212/36.213). Current LTE compliance V8.6 2009-03.
* \author R. Knopp, A. Mico Pereperez
* \date 2018
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
/*! \file dci_nr.c
* \brief Implements PDCCH physical channel TX/RX procedures (36.211) and DCI encoding/decoding (36.212/36.213). Current LTE
* compliance V8.6 2009-03. \author R. Knopp, A. Mico Pereperez \date 2018 \version 0.1 \company Eurecom \email: knopp@eurecom.fr
* \note
* \warning
*/
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/dlsch_demodulation.c
/*! \file nr_dlsch_demodulation.c
* \brief Top-level routines for demodulating the PDSCH physical channel from 38-211, V15.2 2018-06
* \author H.Wang
* \date 2018
@@ -126,21 +126,9 @@ static int nr_dlsch_llr(uint32_t rx_size_symbol,
uint8_t nr_slot_rx,
NR_UE_DLSCH_t dlsch[2],
uint32_t llr_offset[NR_SYMBOLS_PER_SLOT]);
/** \fn dlsch_extract_rbs(int32_t **rxdataF,
int32_t **dl_ch_estimates,
int32_t **rxdataF_ext,
int32_t **dl_ch_estimates_ext,
unsigned char symbol
uint8_t pilots,
uint8_t config_type,
unsigned short start_rb,
unsigned short nb_rb_pdsch,
uint8_t n_dmrs_cdm_groups,
uint8_t Nl,
NR_DL_FRAME_PARMS *frame_parms,
uint16_t dlDmrsSymbPos)
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
for the current allocation and for multiple layer antenna gNB transmission.
/** \fn nr_dlsch_extract_rbs
\brief This function extracts the received resource blocks, both channel estimates and data symbols, for the current
allocation and for multiple layer antenna gNB transmission.
@param rxdataF Raw FFT output of received signal
@param dl_ch_estimates Channel estimates of current slot
@param rxdataF_ext FFT output for RBs in this allocation
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/initial_sync.c
* \brief Routines for initial UE synchronization procedure (PSS,SSS,PBCH and frame format detection)
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,kaltenberger@eurecom.fr
* \note
* \warning
*/
/*! \file nr_initial_sync.c
* \brief Routines for initial UE synchronization procedure (PSS,SSS,PBCH and frame format detection)
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "PHY/types.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_UE_TRANSPORT/transport_proto_ue.h
/*! \file nr_transport_proto_ue.h
* \brief Function prototypes for PHY physical/transport channel processing and generation V8.6 2009-03
* \author R. Knopp, F. Kaltenberger
* \date 2011
@@ -71,6 +71,7 @@ void nr_qpsk_qpsk(int16_t *stream0_in,
@param rho_i Correlation between channel of signal and inteference
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param len
@param first_symbol_flag flag to indicate this is the first symbol of the dlsch
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@@ -87,16 +88,14 @@ int32_t nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
uint16_t pbch_pss_sss_adj,
int16_t **llr128p);
/** \brief This function generates log-likelihood ratios (decoder input) for single-stream QPSK received waveforms.
/** \brief This function generates log-likelihood ratios (decoder input) for single-stream QPSK received waveforms
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param dlsch_llr llr output
@param symbol OFDM symbol index in sub-frame
@param len
@param first_symbol_flag
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param llr128p pointer to pointer to symbol in dlsch_llr
@param beamforming_mode beamforming mode
*/
int32_t nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t *rxdataF_comp,
@@ -111,13 +110,12 @@ int32_t nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param dlsch_llr llr output
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation and weighted for mid-point in 16QAM constellation
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation and weighted for
mid-point in 16QAM constellation
@param len
@param symbol OFDM symbol index in sub-frame
@param first_symbol_flag
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adjust Adjustment factor in RE for PBCH/PSS/SSS allocations
@param llr128p pointer to pointer to symbol in dlsch_llr
@param beamforming_mode beamforming mode
*/
void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
@@ -133,13 +131,14 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
@param frame_parms Frame descriptor structure
@param rxdataF_comp Compensated channel output
@param dlsch_llr llr output
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by first mid-point of 64-QAM constellation
@param dl_ch_magb Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by second mid-point of 64-QAM constellation
@param dl_ch_mag Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by first
mid-point of 64-QAM constellation
@param dl_ch_magb Squared-magnitude of channel in each resource element position corresponding to allocation, weighted by second
mid-point of 64-QAM constellation
@param symbol OFDM symbol index in sub-frame
@param len
@param first_symbol_flag
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adjust PBCH/PSS/SSS RE adjustment (in REs)
@param beamforming_mode beamforming mode
*/
void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
@@ -184,14 +183,18 @@ void nr_conjch0_mult_ch1(int *ch0,
one segment or correct decoding of all segments. Only the segment CRCs are check for the moment, the
overall CRC is ignored. Finally transport block reassembly is performed.
@param phy_vars_ue Pointer to ue variables
@param proc
@param eNB_id
@param dlsch_llr Pointer to LLR values computed by dlsch_demodulation
@param lte_frame_parms Pointer to frame descriptor
@param frame_parms Pointer to frame descriptor
@param dlsch Pointer to DLSCH descriptor
@param harq_process
@param frame Frame number
@param nb_symb_sch
@param nr_slot_rx Slot number
@param num_pdcch_symbols Number of PDCCH symbols
@param is_crnti indicates if PDSCH belongs to a CRNTI (necessary for parallelizing decoding threads)
@param llr8_flag If 1, indicate that the 8-bit turbo decoder should be used
@param harq_pid
@param b_size
@param b
@returns 0 on success, 1 on unsuccessful decoding
*/
@@ -217,12 +220,12 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
unsigned int G);
/*! \brief Perform PUSCH scrambling. TS 38.211 V15.4.0 subclause 6.3.1.1
@param[in] in, Pointer to input bits
@param[in] size, of input bits
@param[in] Nid, cell id
@param[in] n_RNTI, CRNTI
@param[in] in Pointer to input bits
@param[in] size of input bits
@param[in] Nid cell id
@param[in] n_RNTI CRNTI
@param[in] uci_on_pusch whether UCI placeholder bits need to be scrambled (true -> no optimized scrambling)
@param[out] out, the scrambled bits
@param[out] out the scrambled bits
*/
void nr_pusch_codeword_scrambling(uint8_t *in,
uint32_t size,
@@ -312,8 +315,10 @@ int dump_ue_stats(PHY_VARS_NR_UE *phy_vars_ue, UE_nr_rxtx_proc_t *proc, char* bu
end, the basic frame parameters are known (Frame configuration - TDD/FDD and cyclic prefix length,
N_RB_DL, PHICH_CONFIG and Nid_cell) and the UE can begin decoding PDCCH and DLSCH SI to retrieve the rest. Once these
parameters are know, the routine calls some basic initialization routines (cell-specific reference signals, etc.)
@param proc
@param phy_vars_ue Pointer to UE variables
@param mode current running mode
@param n_frames
@param sa current running mode
*/
int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *phy_vars_ue,
@@ -321,8 +326,9 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
int sa);
/*!
\brief This function gets the carrier frequencies either from FP or command-line-set global variables, depending on the availability of the latter
@param fp Pointer to frame params
\brief This function gets the carrier frequencies either from FP or command-line-set global variables, depending on the
availability of the latter
@param ue
@param dl_Carrier Pointer to DL carrier to be set
@param ul_Carrier Pointer to UL carrier to be set
*/
@@ -341,11 +347,7 @@ void nr_get_carrier_frequencies_sl(PHY_VARS_NR_UE *ue,
/*!
\brief This function sets the OAI RF card rx/tx params
@param openair0_cfg Pointer OAI config for a specific card
@param tx_gain_off Tx gain offset
@param rx_gain_off Rx gain offset
@param ul_Carrier UL carrier to be set
@param dl_Carrier DL carrier to be set
@param freq_offset Freq offset to be set
*/
void nr_rf_card_config_gain(openair0_config_t *openair0_cfg,
double rx_gain_off);
@@ -371,8 +373,8 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
fapi_nr_dci_indication_t *dci_ind,
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15);
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel estimation. It performs
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel
estimation. It performs
- RB extraction (signal and channel estimates)
- channel compensation (matched filtering)
- RE extraction (pilot, PBCH, synch. signals)
@@ -380,13 +382,23 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
- LLR computation
This function supports TM1, 2, 3, 5, and 6.
@param ue Pointer to PHY variables
@param type Type of PDSCH (SI_PDSCH,RA_PDSCH,PDSCH,PMCH)
@param eNB_id eNb index (Nid1) 0,1,2
@param eNB_id_i Interfering eNB index (Nid1) 0,1,2, or 3 in case of MU-MIMO IC receiver
@param frame Frame number
@param nr_slot_rx Slot number
@param proc
@prama dlsch
@param symbol Symbol on which to act (within sub-frame)
@param first_symbol_flag set to 1 on first DLSCH symbol
@param harq_pid
@param pdsch_est_size
@param dl_ch_estimates
@param llr
@param dl_valid_re
@param rxdataF
@param llr_offset
@param log2_maxhrx_size_symbol
@param rx_size_symbol
@param nbRx
@param rxdataF_comp
@param ptrs_phase_per_slot
@param ptrs_re_per_slot
*/
int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
+10 -13
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/defs.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
/*! \file nr_transport_ue.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __NR_TRANSPORT_UE__H__
#define __NR_TRANSPORT_UE__H__
#include <limits.h>
@@ -164,7 +164,4 @@ typedef struct {
// PTRS symbol index, to be updated every PTRS symbol within a slot.
uint8_t ptrs_symbol_index;
} NR_UE_DLSCH_t;
/**@}*/
#endif
@@ -19,14 +19,14 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_UE_TRANSPORT/nr_ue_rf_config.c
* \brief Functional helpers to configure the RF boards at UE side
* \author Guido Casati
* \date 2020
* \version 0.1
* \company Fraunhofer IIS
* \email: guido.casati@iis.fraunhofer.de
*/
/*! \file nr_ue_rf_helpers.c
* \brief Functional helpers to configure the RF boards at UE side
* \author Guido Casati
* \date 2020
* \version 0.1
* \company Fraunhofer IIS
* \email: guido.casati@iis.fraunhofer.de
*/
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern_nr_ue.h"
+11 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/NR_UE_TRANSPORT/nr_ulsch.c
* \brief Top-level routines for transmission of the PUSCH TS 38.211 v 15.4.0
* \author Khalid Ahmed
* \date 2019
* \version 0.1
* \company Fraunhofer IIS
* \email: khalid.ahmed@iis.fraunhofer.de
* \note
* \warning
*/
/*! \file nr_ulsch_ue.c
* \brief Top-level routines for transmission of the PUSCH TS 38.211 v 15.4.0
* \author Khalid Ahmed
* \date 2019
* \version 0.1
* \company Fraunhofer IIS
* \email: khalid.ahmed@iis.fraunhofer.de
* \note
* \warning
*/
#include <stdint.h>
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
@@ -292,6 +292,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
/// Transform-coded "y"-sequences (for definition see 38-211 V15.3.0 2018-09, subsection 6.3.1.4)
int32_t y[max_num_re] __attribute__ ((aligned(16)));
memset(y, 0, max_num_re*sizeof(int32_t));
if (pusch_pdu->transform_precoding == transformPrecoder_enabled) {
+6 -5
View File
@@ -666,9 +666,9 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
printf("\t [nr_generate_pucch2] start function at slot(nr_slot_tx)=%d with payload=%lu and nr_bit=%d\n",nr_slot_tx, pucch_pdu->payload, pucch_pdu->n_bit);
#endif
// b is the block of bits transmitted on the physical channel after payload coding
uint64_t b[16]; // limit to 1024-bit encoded length
uint64_t b[16] = {0}; // limit to 1024-bit encoded length
// M_bit is the number of bits of block b (payload after encoding)
uint16_t M_bit;
uint16_t M_bit = 0;
nr_uci_encoding(pucch_pdu->payload,
pucch_pdu->n_bit,
2,0,
@@ -687,7 +687,8 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
* n_id = {0,1,...,1023} equals the higher-layer parameter Data-scrambling-Identity if configured
* n_id = N_ID_cell if higher layer parameter not configured
*/
uint8_t *btilde = malloc(sizeof(int8_t)*M_bit);
uint8_t *btilde = calloc(M_bit, sizeof(uint8_t));
// rnti is given by the C-RNTI
uint16_t rnti=pucch_pdu->rnti;
#ifdef DEBUG_NR_PUCCH_TX
@@ -716,8 +717,8 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
*/
//#define ONE_OVER_SQRT2_S 23171 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2)
// complex-valued symbol d(0)
int16_t *d_re = malloc(sizeof(int16_t)*M_bit);
int16_t *d_im = malloc(sizeof(int16_t)*M_bit);
int16_t *d_re = calloc(M_bit, sizeof(int16_t));
int16_t *d_im = calloc(M_bit, sizeof(int16_t));
uint16_t m_symbol = (M_bit%2==0) ? M_bit/2 : floor(M_bit/2)+1;
for (int i=0; i < m_symbol; i++) { // QPSK modulation subclause 5.1.3
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file PHY/TOOLS/ALAW/alaw_lut.h
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr
* \note
* \warning
*/
/*! \file alaw_lut.h
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr
* \note
* \warning
*/
// Linear to ALaw
// 16 bit signed integer (typecasted as uint16_t) to 8 bit unsigned integer
+5 -5
View File
@@ -25,13 +25,13 @@
// returns the complex dot product of x and y
/*! \brief Complex number dot_product
@param x input vector
@param y input vector
@param N size of vectors
@param output_shift normalization of int multiplications
*/
c32_t dot_product(const c16_t *x,//! input vector
const c16_t *y,//! input vector
const uint32_t N,//! size of the vectors
const int output_shift //! normalization afer int16 multiplication
)
c32_t dot_product(const c16_t *x, const c16_t *y, const uint32_t N, const int output_shift)
{
const int16_t reflip[32] __attribute__((aligned(32))) = {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1};
const int8_t imshuffle[64] __attribute__((aligned(32))) = {2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13, 18, 19, 16, 17, 22, 23, 20, 21, 26, 27, 24, 25, 30, 31, 28, 29};
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file openair1/PHY/CODING/coding_nr_load.c
/*! \file dfts_load.c
* \brief: load library implementing coding/decoding algorithms
* \author Francois TABURET
* \date 2020
+5 -25
View File
@@ -378,26 +378,6 @@ void init_fft(uint16_t size,
uint8_t logsize,
uint16_t *rev);
/*!\fn void fft(int16_t *x,int16_t *y,int16_t *twiddle,uint16_t *rev,uint8_t log2size,uint8_t scale,uint8_t input_fmt)
This function performs optimized fixed-point radix-2 FFT/IFFT.
@param x Input
@param y Output in format: [Re0,Im0,Re0,Im0, Re1,Im1,Re1,Im1, ....., Re(N-1),Im(N-1),Re(N-1),Im(N-1)]
@param twiddle Twiddle factors
@param rev bit-reversed permutation
@param log2size Base-2 logarithm of FFT size
@param scale Total number of shifts (should be log2size/2 for normalized FFT)
@param input_fmt (0 - input is in complex Q1.15 format, 1 - input is in complex redundant Q1.15 format)
*/
/*void fft(int16_t *x,
int16_t *y,
int16_t *twiddle,
uint16_t *rev,
uint8_t log2size,
uint8_t scale,
uint8_t input_fmt
);
*/
#define FOREACH_DFTSZ(SZ_DEF) \
SZ_DEF(12) \
SZ_DEF(24) \
@@ -711,11 +691,6 @@ int32_t sub_cpx_vector16(int16_t *x,
*/
int32_t signal_energy(int32_t *,uint32_t);
/*!\fn int32_t signal_energy_fixed_p9(int *input, uint32_t length);
\brief Computes the signal energy per subcarrier
\ the input signal has a fixed point representation of AMP_SHIFT bits
\ the ouput energy has a fixed point representation of AMP_SHIFT bits
*/
int32_t signal_energy_amp_shift(int32_t *input, uint32_t length);
#ifdef LOCALIZATION
@@ -791,6 +766,11 @@ double interp(double x, double *xs, double *ys, int count);
void simde_mm128_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
static __attribute__((always_inline)) inline int count_bits_set(uint64_t v)
{
return __builtin_popcountll(v);
}
#ifdef __cplusplus
}
#endif
-1
View File
@@ -249,7 +249,6 @@ typedef struct RU_proc_t_s {
int instance_cnt_feptx;
/// \internal This variable is protected by \ref mutex_ru_thread
int instance_cnt_ru;
/// This varible is protected by \ref mutex_emulatedRF
int instance_cnt_emulateRF;
/// pthread structure for RU FH processing thread
pthread_t pthread_FH;
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/defs.h
/*! \file defs_UE.h
\brief Top-level defines and structure definitions
\author R. Knopp, F. Kaltenberger
\date 2011
+107 -72
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file PHY/defs.h
/*! \file defs_common.h
\brief Top-level defines and structure definitions
\author R. Knopp, F. Kaltenberger
\date 2011
@@ -129,22 +129,24 @@ typedef struct {
/// PRACH-ConfigInfo from 36.331 RRC spec
typedef struct {
/// Parameter: prach-ConfigurationIndex, see TS 36.211 (5.7.1). \vr{[0..63]}
/// Parameter: prach-ConfigurationIndex, see TS 36.211 (5.7.1). {[0..63]}
uint8_t prach_ConfigIndex;
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). {[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
uint8_t highSpeedFlag;
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4.
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). {[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to
/// table 5.7.2-3 for preamble format 4.
uint8_t zeroCorrelationZoneConfig;
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex.
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). {[0..94]}\n For TDD the value range is dependent on the value of \ref
/// prach_ConfigIndex.
uint8_t prach_FreqOffset;
} PRACH_CONFIG_INFO;
/// PRACH-ConfigSIB or PRACH-Config from 36.331 RRC spec
typedef struct {
/// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]}
/// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). {[0..837]}
uint16_t rootSequenceIndex;
/// prach_Config_enabled=1 means enabled. \vr{[0..1]}
/// prach_Config_enabled=1 means enabled. {[0..1]}
uint8_t prach_Config_enabled;
/// PRACH Configuration Information
PRACH_CONFIG_INFO prach_ConfigInfo;
@@ -152,11 +154,13 @@ typedef struct {
/// PRACH-eMTC-Config from 36.331 RRC spec
typedef struct {
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). {[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
uint8_t highSpeedFlag;
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4.
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). {[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to
/// table 5.7.2-3 for preamble format 4.
uint8_t zeroCorrelationZoneConfig;
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex.
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). {[0..94]}\n For TDD the value range is dependent on the value of \ref
/// prach_ConfigIndex.
/// PRACH starting subframe periodicity, expressed in number of subframes available for preamble transmission (PRACH opportunities), see TS 36.211. Value 2 corresponds to 2 subframes, 4 corresponds to 4 subframes and so on. EUTRAN configures the PRACH starting subframe periodicity larger than or equal to the Number of PRACH repetitions per attempt for each CE level (numRepetitionPerPreambleAttempt).
uint8_t prach_starting_subframe_periodicity[4];
@@ -176,9 +180,9 @@ typedef struct {
/// PRACH-ConfigSIB or PRACH-Config from 36.331 RRC spec
typedef struct {
/// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]}
/// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). {[0..837]}
uint16_t rootSequenceIndex;
/// prach_Config_enabled=1 means enabled. \vr{[0..1]}
/// prach_Config_enabled=1 means enabled. {[0..1]}
uint8_t prach_Config_enabled;
/// PRACH Configuration Information
PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
@@ -200,11 +204,11 @@ typedef enum {
/// PUCCH-ConfigDedicated from 36.331 RRC spec
typedef struct {
/// Flag to indicate ACK NAK repetition activation, see TS 36.213 (10.1). \vr{[0..1]}
/// Flag to indicate ACK NAK repetition activation, see TS 36.213 (10.1). {[0..1]}
uint8_t ackNackRepetition;
/// Parameter: \f$N_\text{ANRep}\f$, see TS 36.213 (10.1).
ACKNAKREP_t repetitionFactor;
/// Parameter: \f$n^{(1)}_\text{PUCCH,ANRep}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
/// Parameter: \f$n^{(1)}_\text{PUCCH,ANRep}\f$, see TS 36.213 (10.1). {[0..2047]}
uint16_t n1PUCCH_AN_Rep;
/// Feedback mode, see TS 36.213 (7.3). \details Applied to both PUCCH and PUSCH feedback. For TDD, should always be set to bundling.
ANFBmode_t tdd_AckNackFeedbackMode;
@@ -212,13 +216,14 @@ typedef struct {
/// PUCCH-ConfigCommon from 36.331 RRC spec
typedef struct {
/// Parameter: \f$\Delta^\text{PUCCH}_\text{shift}\f$, see TS 36.211 (5.4.1). \vr{[1..3]} \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta^\text{PUCCH}_\text{shift}\f$, see TS 36.211 (5.4.1). {[1..3]} \note the specification sais it is an
/// enumerated value.
uint8_t deltaPUCCH_Shift;
/// Parameter: \f$N^{(2)}_\text{RB}\f$, see TS 36.211 (5.4). \vr{[0..98]}
/// Parameter: \f$N^{(2)}_\text{RB}\f$, see TS 36.211 (5.4). {[0..98]}
uint8_t nRB_CQI;
/// Parameter: \f$N^{(1)}_\text{CS}\f$, see TS 36.211 (5.4). \vr{[0..7]}
/// Parameter: \f$N^{(1)}_\text{CS}\f$, see TS 36.211 (5.4). {[0..7]}
uint8_t nCS_AN;
/// Parameter: \f$N^{(1)}_\text{PUCCH}\f$ see TS 36.213 (10.1). \vr{[0..2047]}
/// Parameter: \f$N^{(1)}_\text{PUCCH}\f$ see TS 36.213 (10.1). {[0..2047]}
uint16_t n1PUCCH_AN;
/// group hopping sequence for DRS \note not part of offical UL-PUCCH_CONFIG_COMMON ASN1 specification.
@@ -229,13 +234,13 @@ typedef struct {
/// UL-ReferenceSignalsPUSCH from 36.331 RRC spec
typedef struct {
/// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). \vr{[0..1]}
/// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). {[0..1]}
uint8_t groupHoppingEnabled;
/// Parameter: \f$\Delta SS\f$, see TS 36.211 (5.5.1.3). \vr{[0..29]}
/// Parameter: \f$\Delta SS\f$, see TS 36.211 (5.5.1.3). {[0..29]}
uint8_t groupAssignmentPUSCH;
/// Parameter: Sequence-hopping-enabled, see TS 36.211 (5.5.1.4). \vr{[0..1]}
/// Parameter: Sequence-hopping-enabled, see TS 36.211 (5.5.1.4). {[0..1]}
uint8_t sequenceHoppingEnabled;
/// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). \vr{[0..7]}
/// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). {[0..7]}
uint8_t cyclicShift;
/// nPRS for cyclic shift of DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
uint8_t nPRS[20];
@@ -253,13 +258,13 @@ typedef enum {
/// PUSCH-ConfigCommon from 36.331 RRC spec.
typedef struct {
/// Parameter: \f$N_{sb}\f$, see TS 36.211 (5.3.4). \vr{[1..4]}
/// Parameter: \f$N_{sb}\f$, see TS 36.211 (5.3.4). {[1..4]}
uint8_t n_SB;
/// Parameter: Hopping-mode, see TS 36.211 (5.3.4).
PUSCH_HOPPING_t hoppingMode;
/// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). \vr{[0..98]}
/// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). {[0..98]}
uint8_t pusch_HoppingOffset;
/// See TS 36.213 (8.6.1). \vr{[0..1]} 1 indicates 64QAM is allowed, 0 not allowed.
/// See TS 36.213 (8.6.1). {[0..1]} 1 indicates 64QAM is allowed, 0 not allowed.
uint8_t enable64QAM;
/// Ref signals configuration
UL_REFERENCE_SIGNALS_PUSCH_t ul_ReferenceSignalsPUSCH;
@@ -267,11 +272,11 @@ typedef struct {
/// UE specific PUSCH configuration.
typedef struct {
/// Parameter: \f$I^\text{HARQ-ACK}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-1). \vr{[0..15]}
/// Parameter: \f$I^\text{HARQ-ACK}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-1). {[0..15]}
uint16_t betaOffset_ACK_Index;
/// Parameter: \f$I^{RI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-2). \vr{[0..15]}
/// Parameter: \f$I^{RI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-2). {[0..15]}
uint16_t betaOffset_RI_Index;
/// Parameter: \f$I^{CQI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-3). \vr{[0..15]}
/// Parameter: \f$I^{CQI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-3). {[0..15]}
uint16_t betaOffset_CQI_Index;
} PUSCH_CONFIG_DEDICATED;
@@ -285,9 +290,10 @@ typedef struct {
/// PDSCH-ConfigCommon from 36.331 RRC spec
typedef struct {
/// Parameter: Reference-signal power, see TS 36.213 (5.2). \vr{[-60..50]}\n Provides the downlink reference-signal EPRE. The actual value in dBm.
/// Parameter: Reference-signal power, see TS 36.213 (5.2). {[-60..50]}\n Provides the downlink reference-signal EPRE. The actual
/// value in dBm.
int8_t referenceSignalPower;
/// Parameter: \f$P_B\f$, see TS 36.213 (Table 5.2-1). \vr{[0..3]}
/// Parameter: \f$P_B\f$, see TS 36.213 (Table 5.2-1). {[0..3]}
uint8_t p_b;
} PDSCH_CONFIG_COMMON;
@@ -311,13 +317,15 @@ typedef struct {
/// SoundingRS-UL-ConfigCommon Information Element from 36.331 RRC spec
typedef struct {
/// enabled flag=1 means SRS is enabled. \vr{[0..1]}
/// enabled flag=1 means SRS is enabled. {[0..1]}
uint8_t enabled_flag;
/// Parameter: SRS Bandwidth Configuration, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). \vr{[0..7]}\n Actual configuration depends on UL bandwidth. \note the specification sais it is an enumerated value.
/// Parameter: SRS Bandwidth Configuration, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). {[0..7]}\n Actual
/// configuration depends on UL bandwidth. \note the specification sais it is an enumerated value.
uint8_t srs_BandwidthConfig;
/// Parameter: SRS SubframeConfiguration, see TS 36.211 (table 5.5.3.3-1 for FDD, table 5.5.3.3-2 for TDD). \vr{[0..15]} \note the specification sais it is an enumerated value.
/// Parameter: SRS SubframeConfiguration, see TS 36.211 (table 5.5.3.3-1 for FDD, table 5.5.3.3-2 for TDD). {[0..15]} \note the
/// specification sais it is an enumerated value.
uint8_t srs_SubframeConfig;
/// Parameter: Simultaneous-AN-and-SRS, see TS 36.213 (8.2). \vr{[0..1]}
/// Parameter: Simultaneous-AN-and-SRS, see TS 36.213 (8.2). {[0..1]}
uint8_t ackNackSRS_SimultaneousTransmission;
/// Parameter: srsMaxUpPts, see TS 36.211 (5.5.3.2). \details If this field is present, reconfiguration of \f$m^\text{max}_\text{SRS,0}\f$ applies for UpPts, otherwise reconfiguration does not apply.
uint8_t srs_MaxUpPts;
@@ -390,19 +398,22 @@ typedef struct {
uint8_t subframe;
/// rnti
uint16_t rnti;
/// Parameter: \f$B_\text{SRS}\f$, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). \vr{[0..3]} \note the specification sais it is an enumerated value.
/// Parameter: \f$B_\text{SRS}\f$, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). {[0..3]} \note the
/// specification sais it is an enumerated value.
uint8_t srs_Bandwidth;
/// Parameter: SRS hopping bandwidth \f$b_\text{hop}\in\{0,1,2,3\}\f$, see TS 36.211 (5.5.3.2) \vr{[0..3]} \note the specification sais it is an enumerated value.
/// Parameter: SRS hopping bandwidth \f$b_\text{hop}\in\{0,1,2,3\}\f$, see TS 36.211 (5.5.3.2) {[0..3]} \note the specification
/// sais it is an enumerated value.
uint8_t srs_HoppingBandwidth;
/// Parameter: \f$n_\text{RRC}\f$, see TS 36.211 (5.5.3.2). \vr{[0..23]}
/// Parameter: \f$n_\text{RRC}\f$, see TS 36.211 (5.5.3.2). {[0..23]}
uint8_t freqDomainPosition;
/// Parameter: Duration, see TS 36.213 (8.2). \vr{[0..1]} 0 corresponds to "single" and 1 to "indefinite".
/// Parameter: Duration, see TS 36.213 (8.2). {[0..1]} 0 corresponds to "single" and 1 to "indefinite".
uint8_t duration;
/// Parameter: \f$k_\text{TC}\in\{0,1\}\f$, see TS 36.211 (5.5.3.2). \vr{[0..1]}
/// Parameter: \f$k_\text{TC}\in\{0,1\}\f$, see TS 36.211 (5.5.3.2). {[0..1]}
uint8_t transmissionComb;
/// Parameter: \f$I_\text{SRS}\f$, see TS 36.213 (table 8.2-1). \vr{[0..1023]}
/// Parameter: \f$I_\text{SRS}\f$, see TS 36.213 (table 8.2-1). {[0..1023]}
uint16_t srs_ConfigIndex;
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). {[0..7]} \note the specification sais it is an enumerated
/// value.
uint8_t cyclicShift;
// Parameter: internal implementation: UE SRS configured
uint8_t srsConfigDedicatedSetup;
@@ -414,15 +425,20 @@ typedef struct {
/// UplinkPowerControlDedicated Information Element from 36.331 RRC spec
typedef struct {
/// Parameter: \f$P_\text{0\_UE\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dB. \vr{[-8..7]}\n This field is applicable for non-persistent scheduling, only.
/// Parameter: \f$P_\text{0\_UE\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dB. {[-8..7]}\n This field is applicable for
/// non-persistent scheduling, only.
int8_t p0_UE_PUSCH;
/// Parameter: Ks, see TS 36.213 (5.1.1.1). \vr{[0..1]}\n en0 corresponds to value 0 corresponding to state “disabled”. en1 corresponds to value 1.25 corresponding to “enabled”. \note the specification sais it is an enumerated value. \warning the enumeration values do not correspond to the given values in the specification (en1 should be 1.25).
/// Parameter: Ks, see TS 36.213 (5.1.1.1). {[0..1]}\n en0 corresponds to value 0 corresponding to state “disabled”. en1
/// corresponds to value 1.25 corresponding to “enabled”. \note the specification sais it is an enumerated value. \warning the
/// enumeration values do not correspond to the given values in the specification (en1 should be 1.25).
uint8_t deltaMCS_Enabled;
/// Parameter: Accumulation-enabled, see TS 36.213 (5.1.1.1). \vr{[0..1]} 1 corresponds to "enabled" whereas 0 corresponds to "disabled".
/// Parameter: Accumulation-enabled, see TS 36.213 (5.1.1.1). {[0..1]} 1 corresponds to "enabled" whereas 0 corresponds to
/// "disabled".
uint8_t accumulationEnabled;
/// Parameter: \f$P_\text{0\_UE\_PUCCH}(1)\f$, see TS 36.213 (5.1.2.1), unit dB. \vr{[-8..7]}
/// Parameter: \f$P_\text{0\_UE\_PUCCH}(1)\f$, see TS 36.213 (5.1.2.1), unit dB. {[-8..7]}
int8_t p0_UE_PUCCH;
/// Parameter: \f$P_\text{SRS\_OFFSET}\f$, see TS 36.213 (5.1.3.1). \vr{[0..15]}\n For Ks=1.25 (\ref deltaMCS_Enabled), the actual parameter value is pSRS_Offset value - 3. For Ks=0, the actual parameter value is -10.5 + 1.5*pSRS_Offset value.
/// Parameter: \f$P_\text{SRS\_OFFSET}\f$, see TS 36.213 (5.1.3.1). {[0..15]}\n For Ks=1.25 (\ref deltaMCS_Enabled), the actual
/// parameter value is pSRS_Offset value - 3. For Ks=0, the actual parameter value is -10.5 + 1.5*pSRS_Offset value.
int8_t pSRS_Offset;
/// Specifies the filtering coefficient for RSRP measurements used to calculate path loss, as specified in TS 36.213 (5.1.1.1).\details The same filtering mechanism applies as for quantityConfig described in 5.5.3.2. \note the specification sais it is an enumerated value.
uint8_t filterCoefficient;
@@ -452,39 +468,46 @@ typedef enum {
/// UplinkPowerControlCommon Information Element from 36.331 RRC spec \note this structure does not currently make use of \ref deltaFList_PUCCH_t.
typedef struct {
/// Parameter: \f$P_\text{0\_NOMINAL\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dBm. \vr{[-126..24]}\n This field is applicable for non-persistent scheduling, only.
/// Parameter: \f$P_\text{0\_NOMINAL\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dBm. {[-126..24]}\n This field is applicable for
/// non-persistent scheduling, only.
int8_t p0_NominalPUSCH;
/// Parameter: \f$\alpha\f$, see TS 36.213 (5.1.1.1) \warning the enumeration values do not correspond to the given values in the specification (al04 should be 0.4, ...)!
PUSCH_alpha_t alpha;
/// Parameter: \f$P_\text{0\_NOMINAL\_PUCCH}\f$ See TS 36.213 (5.1.2.1), unit dBm. \vr{[-127..-96]}
/// Parameter: \f$P_\text{0\_NOMINAL\_PUCCH}\f$ See TS 36.213 (5.1.2.1), unit dBm. {[-127..-96]}
int8_t p0_NominalPUCCH;
/// Parameter: \f$\Delta_\text{PREAMBLE\_Msg3}\f$ see TS 36.213 (5.1.1.1). \vr{[-1..6]}\n Actual value = IE value * 2 [dB].
/// Parameter: \f$\Delta_\text{PREAMBLE\_Msg3}\f$ see TS 36.213 (5.1.1.1). {[-1..6]}\n Actual value = IE value * 2 [dB].
int8_t deltaPreambleMsg3;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1, see TS 36.213 (5.1.2). {[0..2]} \warning check value range,
/// why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format1;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1a, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1a, see TS 36.213 (5.1.2). {[0..2]} \warning check value
/// range, why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format1a;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1b, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1b, see TS 36.213 (5.1.2). {[0..2]} \warning check value
/// range, why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format1b;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2, see TS 36.213 (5.1.2). \vr{[0..3]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2, see TS 36.213 (5.1.2). {[0..3]} \warning check value range,
/// why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format2;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2a, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2a, see TS 36.213 (5.1.2). {[0..2]} \warning check value
/// range, why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format2a;
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2b, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
/// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2b, see TS 36.213 (5.1.2). {[0..2]} \warning check value
/// range, why is this a long? \note the specification sais it is an enumerated value.
long deltaF_PUCCH_Format2b;
} UL_POWER_CONTROL_CONFIG_COMMON;
/// Union for \ref TPC_PDCCH_CONFIG::tpc_Index.
typedef union {
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). \vr{[1..15]}
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). {[1..15]}
uint8_t indexOfFormat3;
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). \vr{[1..31]}
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). {[1..31]}
uint8_t indexOfFormat3A;
} TPC_INDEX_t;
/// TPC-PDCCH-Config Information Element from 36.331 RRC spec
typedef struct {
/// RNTI for power control using DCI format 3/3A, see TS 36.212. \vr{[0..65535]}
/// RNTI for power control using DCI format 3/3A, see TS 36.212. {[0..65535]}
uint16_t rnti;
/// Index of N or M, see TS 36.212 (5.3.3.1.6 and 5.3.3.1.7), where N or M is dependent on the used DCI format (i.e. format 3 or 3a).
TPC_INDEX_t tpc_Index;
@@ -501,9 +524,9 @@ typedef enum {
/// SchedulingRequestConfig Information Element from 36.331 RRC spec
typedef struct {
/// Parameter: \f$n^{(1)}_\text{PUCCH,SRI}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
/// Parameter: \f$n^{(1)}_\text{PUCCH,SRI}\f$, see TS 36.213 (10.1). {[0..2047]}
uint16_t sr_PUCCH_ResourceIndex;
/// Parameter: \f$I_\text{SR}\f$, see TS 36.213 (10.1). \vr{[0..155]}
/// Parameter: \f$I_\text{SR}\f$, see TS 36.213 (10.1). {[0..155]}
uint8_t sr_ConfigIndex;
/// Parameter for SR transmission in TS 36.321 (5.4.4). \details The value n4 corresponds to 4 transmissions, n8 corresponds to 8 transmissions and so on.
DSR_TRANSMAX_t dsr_TransMax;
@@ -511,15 +534,17 @@ typedef struct {
/// CQI-ReportPeriodic
typedef struct {
/// Parameter: \f$n^{(2)}_\text{PUCCH}\f$, see TS 36.213 (7.2). \vr{[0..1185]}, -1 indicates inactivity
/// Parameter: \f$n^{(2)}_\text{PUCCH}\f$, see TS 36.213 (7.2). {[0..1185]}, -1 indicates inactivity
int16_t cqi_PUCCH_ResourceIndex;
/// Parameter: CQI/PMI Periodicity and Offset Configuration Index \f$I_\text{CQI/PMI}\f$, see TS 36.213 (tables 7.2.2-1A and 7.2.2-1C). \vr{[0..1023]}
/// Parameter: CQI/PMI Periodicity and Offset Configuration Index \f$I_\text{CQI/PMI}\f$, see TS 36.213 (tables 7.2.2-1A
/// and 7.2.2-1C). {[0..1023]}
int16_t cqi_PMI_ConfigIndex;
/// Parameter: K, see 36.213 (4.2.2). \vr{[1..4]}
/// Parameter: K, see 36.213 (4.2.2). {[1..4]}
uint8_t K;
/// Parameter: RI Config Index \f$I_\text{RI}\f$, see TS 36.213 (7.2.2-1B). \vr{[0..1023]}, -1 indicates inactivity
/// Parameter: RI Config Index \f$I_\text{RI}\f$, see TS 36.213 (7.2.2-1B). {[0..1023]}, -1 indicates inactivity
int16_t ri_ConfigIndex;
/// Parameter: Simultaneous-AN-and-CQI, see TS 36.213 (10.1). \vr{[0..1]} 1 indicates that simultaneous transmission of ACK/NACK and CQI is allowed.
/// Parameter: Simultaneous-AN-and-CQI, see TS 36.213 (10.1). {[0..1]} 1 indicates that simultaneous transmission of ACK/NACK and
/// CQI is allowed.
uint8_t simultaneousAckNackAndCQI;
/// parameter computed from Tables 7.2.2-1A and 7.2.2-1C
uint16_t Npd;
@@ -540,7 +565,7 @@ typedef enum {
typedef struct {
/// Parameter: reporting mode. Value rm12 corresponds to Mode 1-2, rm20 corresponds to Mode 2-0, rm22 corresponds to Mode 2-2 etc. PUSCH reporting modes are described in TS 36.213 [23, 7.2.1].
CQI_REPORTMODEAPERIODIC cqi_ReportModeAperiodic;
/// Parameter: \f$\Delta_\text{offset}\f$, see TS 36.213 (7.2.3). \vr{[-1..6]}\n Actual value = IE value * 2 [dB].
/// Parameter: \f$\Delta_\text{offset}\f$, see TS 36.213 (7.2.3). {[-1..6]}\n Actual value = IE value * 2 [dB].
int8_t nomPDSCH_RS_EPRE_Offset;
CQI_REPORTPERIODIC CQI_ReportPeriodic;
} CQI_REPORT_CONFIG;
@@ -549,15 +574,25 @@ typedef struct {
typedef struct {
/// MBSFN subframe occurance. \details Radio-frames that contain MBSFN subframes occur when equation SFN mod radioFrameAllocationPeriod = radioFrameAllocationOffset is satisfied. When fourFrames is used for subframeAllocation, the equation defines the first radio frame referred to in the description below. Values n1 and n2 are not applicable when fourFrames is used. \note the specification sais it is an enumerated value {n1, n2, n4, n8, n16, n32}.
int radioframeAllocationPeriod;
/// MBSFN subframe occurance. \vr{[0..7]}\n Radio-frames that contain MBSFN subframes occur when equation SFN mod radioFrameAllocationPeriod = radioFrameAllocationOffset is satisfied. When fourFrames is used for subframeAllocation, the equation defines the first radio frame referred to in the description below. Values n1 and n2 are not applicable when fourFrames is used.
/// MBSFN subframe occurance. {[0..7]}\n Radio-frames that contain MBSFN subframes occur when equation SFN mod
/// radioFrameAllocationPeriod = radioFrameAllocationOffset is satisfied. When fourFrames is used for subframeAllocation, the
/// equation defines the first radio frame referred to in the description below. Values n1 and n2 are not applicable when
/// fourFrames is used.
int radioframeAllocationOffset;
/// oneFrame or fourFrames. \vr{[0..1]}
/// oneFrame or fourFrames. {[0..1]}
int fourFrames_flag;
/// Subframe configuration. \vr{[0..63]} (\ref fourFrames_flag == 0) or \vr{[0..16777215]} (\ref fourFrames_flag == 1)
/// Subframe configuration. {[0..63]} (\ref fourFrames_flag == 0) or {[0..16777215]} (\ref fourFrames_flag == 1)
/// \par fourFrames_flag == 0
/// "1" denotes that the corresponding subframe is allocated for MBSFN. The following mapping applies:\n FDD: The first/leftmost bit defines the MBSFN allocation for subframe #1, the second bit for #2, third bit for #3 , fourth bit for #6, fifth bit for #7, sixth bit for #8.\n TDD: The first/leftmost bit defines the allocation for subframe #3, the second bit for #4, third bit for #7, fourth bit for #8, fifth bit for #9. Uplink subframes are not allocated. The last bit is not used.
/// \par fourFrames_flag == 1
/// A bit-map indicating MBSFN subframe allocation in four consecutive radio frames, "1" denotes that the corresponding subframe is allocated for MBSFN. The bitmap is interpreted as follows:\n FDD: Starting from the first radioframe and from the first/leftmost bit in the bitmap, the allocation applies to subframes #1, #2, #3 , #6, #7, and #8 in the sequence of the four radio-frames.\n TDD: Starting from the first radioframe and from the first/leftmost bit in the bitmap, the allocation applies to subframes #3, #4, #7, #8, and #9 in the sequence of the four radio-frames. The last four bits are not used. Uplink subframes are not allocated.
/// "1" denotes that the corresponding subframe is allocated for MBSFN. The following mapping applies:\n FDD: The first/leftmost
/// bit defines the MBSFN allocation for subframe #1, the second bit for #2, third bit for #3 , fourth bit for #6, fifth bit for
/// #7, sixth bit for #8.\n TDD: The first/leftmost bit defines the allocation for subframe #3, the second bit for #4, third bit
/// for #7, fourth bit for #8, fifth bit for #9. Uplink subframes are not allocated. The last bit is not used. \par
/// fourFrames_flag == 1 A bit-map indicating MBSFN subframe allocation in four consecutive radio frames, "1" denotes that the
/// corresponding subframe is allocated for MBSFN. The bitmap is interpreted as follows:\n FDD: Starting from the first radioframe
/// and from the first/leftmost bit in the bitmap, the allocation applies to subframes #1, #2, #3 , #6, #7, and #8 in the sequence
/// of the four radio-frames.\n TDD: Starting from the first radioframe and from the first/leftmost bit in the bitmap, the
/// allocation applies to subframes #3, #4, #7, #8, and #9 in the sequence of the four radio-frames. The last four bits are not
/// used. Uplink subframes are not allocated.
int mbsfn_SubframeConfig;
} MBSFN_config_t;
+49 -39
View File
@@ -44,15 +44,15 @@ typedef enum {SF_DL_NB_IoT, SF_UL_NB_IoT, SF_S_NB_IoT} NB_IoT_subframe_t;
/////////////////////////
/// Union for \ref TPC_PDCCH_CONFIG::tpc_Index.
typedef union {
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). \vr{[1..15]}
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). {[1..15]}
uint8_t indexOfFormat3;
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). \vr{[1..31]}
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). {[1..31]}
uint8_t indexOfFormat3A;
} TPC_INDEX_NB_IoT_t;
/// TPC-PDCCH-Config Information Element from 36.331 RRC spec
typedef struct {
/// RNTI for power control using DCI format 3/3A, see TS 36.212. \vr{[0..65535]}
/// RNTI for power control using DCI format 3/3A, see TS 36.212. {[0..65535]}
uint16_t rnti;
/// Index of N or M, see TS 36.212 (5.3.3.1.6 and 5.3.3.1.7), where N or M is dependent on the used DCI format (i.e. format 3 or 3a).
TPC_INDEX_NB_IoT_t tpc_Index;
@@ -72,22 +72,22 @@ typedef enum {
/// PUCCH-ConfigDedicated from 36.331 RRC spec
typedef struct {
/// Flag to indicate ACK NAK repetition activation, see TS 36.213 (10.1). \vr{[0..1]}
/// Flag to indicate ACK NAK repetition activation, see TS 36.213 (10.1). {[0..1]}
uint8_t ackNackRepetition;
/// Parameter: \f$N_\text{ANRep}\f$, see TS 36.213 (10.1).
ACKNAKREP_NB_IoT_t repetitionFactor;
/// Parameter: \f$n^{(1)}_\text{PUCCH,ANRep}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
/// Parameter: \f$n^{(1)}_\text{PUCCH,ANRep}\f$, see TS 36.213 (10.1). {[0..2047]}
uint16_t n1PUCCH_AN_Rep;
/// Feedback mode, see TS 36.213 (7.3). \details Applied to both PUCCH and PUSCH feedback. For TDD, should always be set to bundling.
ANFBmode_NB_IoT_t tdd_AckNackFeedbackMode;
} PUCCH_CONFIG_DEDICATED_NB_IoT;
// UE specific PUSCH configuration.
typedef struct {
/// Parameter: \f$I^\text{HARQ-ACK}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-1). \vr{[0..15]}
/// Parameter: \f$I^\text{HARQ-ACK}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-1). {[0..15]}
uint16_t betaOffset_ACK_Index;
/// Parameter: \f$I^{RI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-2). \vr{[0..15]}
/// Parameter: \f$I^{RI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-2). {[0..15]}
uint16_t betaOffset_RI_Index;
/// Parameter: \f$I^{CQI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-3). \vr{[0..15]}
/// Parameter: \f$I^{CQI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-3). {[0..15]}
uint16_t betaOffset_CQI_Index;
} PUSCH_CONFIG_DEDICATED_NB_IoT;
/// Enumeration for Parameter \f$P_A\f$ \ref PDSCH_CONFIG_DEDICATED::p_a.
@@ -110,39 +110,46 @@ typedef struct {
/// UplinkPowerControlDedicated Information Element from 36.331 RRC spec
typedef struct {
/// Parameter: \f$P_\text{0\_UE\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dB. \vr{[-8..7]}\n This field is applicable for non-persistent scheduling, only.
/// Parameter: \f$P_\text{0\_UE\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dB. {[-8..7]}\n This field is applicable for
/// non-persistent scheduling, only.
int8_t p0_UE_PUSCH;
/// Parameter: Ks, see TS 36.213 (5.1.1.1). \vr{[0..1]}\n en0 corresponds to value 0 corresponding to state “disabled”. en1 corresponds to value 1.25 corresponding to “enabled”. \note the specification sais it is an enumerated value. \warning the enumeration values do not correspond to the given values in the specification (en1 should be 1.25).
/// Parameter: Ks, see TS 36.213 (5.1.1.1). {[0..1]}\n en0 corresponds to value 0 corresponding to state “disabled”. en1
/// corresponds to value 1.25 corresponding to “enabled”. \note the specification sais it is an enumerated value. \warning the
/// enumeration values do not correspond to the given values in the specification (en1 should be 1.25).
uint8_t deltaMCS_Enabled;
/// Parameter: Accumulation-enabled, see TS 36.213 (5.1.1.1). \vr{[0..1]} 1 corresponds to "enabled" whereas 0 corresponds to "disabled".
/// Parameter: Accumulation-enabled, see TS 36.213 (5.1.1.1). {[0..1]} 1 corresponds to "enabled" whereas 0 corresponds to
/// "disabled".
uint8_t accumulationEnabled;
/// Parameter: \f$P_\text{0\_UE\_PUCCH}(1)\f$, see TS 36.213 (5.1.2.1), unit dB. \vr{[-8..7]}
/// Parameter: \f$P_\text{0\_UE\_PUCCH}(1)\f$, see TS 36.213 (5.1.2.1), unit dB. {[-8..7]}
int8_t p0_UE_PUCCH;
/// Parameter: \f$P_\text{SRS\_OFFSET}\f$, see TS 36.213 (5.1.3.1). \vr{[0..15]}\n For Ks=1.25 (\ref deltaMCS_Enabled), the actual parameter value is pSRS_Offset value - 3. For Ks=0, the actual parameter value is -10.5 + 1.5*pSRS_Offset value.
/// Parameter: \f$P_\text{SRS\_OFFSET}\f$, see TS 36.213 (5.1.3.1). {[0..15]}\n For Ks=1.25 (\ref deltaMCS_Enabled), the actual
/// parameter value is pSRS_Offset value - 3. For Ks=0, the actual parameter value is -10.5 + 1.5*pSRS_Offset value.
int8_t pSRS_Offset;
/// Specifies the filtering coefficient for RSRP measurements used to calculate path loss, as specified in TS 36.213 (5.1.1.1).\details The same filtering mechanism applies as for quantityConfig described in 5.5.3.2. \note the specification sais it is an enumerated value.
uint8_t filterCoefficient;
} UL_POWER_CONTROL_DEDICATED_NB_IoT;
/// Union for \ref TPC_PDCCH_CONFIG::tpc_Index.
//typedef union {
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). \vr{[1..15]}
// uint8_t indexOfFormat3;
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). \vr{[1..31]}
// uint8_t indexOfFormat3A;
// typedef union {
/// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). {[1..15]}
// uint8_t indexOfFormat3;
/// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). {[1..31]}
// uint8_t indexOfFormat3A;
//} TPC_INDEX_NB_IoT_t;
/// CQI-ReportPeriodic
typedef struct {
/// Parameter: \f$n^{(2)}_\text{PUCCH}\f$, see TS 36.213 (7.2). \vr{[0..1185]}, -1 indicates inactivity
/// Parameter: \f$n^{(2)}_\text{PUCCH}\f$, see TS 36.213 (7.2). {[0..1185]}, -1 indicates inactivity
int16_t cqi_PUCCH_ResourceIndex;
/// Parameter: CQI/PMI Periodicity and Offset Configuration Index \f$I_\text{CQI/PMI}\f$, see TS 36.213 (tables 7.2.2-1A and 7.2.2-1C). \vr{[0..1023]}
/// Parameter: CQI/PMI Periodicity and Offset Configuration Index \f$I_\text{CQI/PMI}\f$, see TS 36.213 (tables 7.2.2-1A
/// and 7.2.2-1C). {[0..1023]}
int16_t cqi_PMI_ConfigIndex;
/// Parameter: K, see 36.213 (4.2.2). \vr{[1..4]}
/// Parameter: K, see 36.213 (4.2.2). {[1..4]}
uint8_t K;
/// Parameter: RI Config Index \f$I_\text{RI}\f$, see TS 36.213 (7.2.2-1B). \vr{[0..1023]}, -1 indicates inactivity
/// Parameter: RI Config Index \f$I_\text{RI}\f$, see TS 36.213 (7.2.2-1B). {[0..1023]}, -1 indicates inactivity
int16_t ri_ConfigIndex;
/// Parameter: Simultaneous-AN-and-CQI, see TS 36.213 (10.1). \vr{[0..1]} 1 indicates that simultaneous transmission of ACK/NACK and CQI is allowed.
/// Parameter: Simultaneous-AN-and-CQI, see TS 36.213 (10.1). {[0..1]} 1 indicates that simultaneous transmission of ACK/NACK and
/// CQI is allowed.
uint8_t simultaneousAckNackAndCQI;
/// parameter computed from Tables 7.2.2-1A and 7.2.2-1C
uint16_t Npd;
@@ -163,26 +170,29 @@ typedef enum {
typedef struct {
/// Parameter: reporting mode. Value rm12 corresponds to Mode 1-2, rm20 corresponds to Mode 2-0, rm22 corresponds to Mode 2-2 etc. PUSCH reporting modes are described in TS 36.213 [23, 7.2.1].
CQI_REPORTMODEAPERIODIC_NB_IoT cqi_ReportModeAperiodic;
/// Parameter: \f$\Delta_\text{offset}\f$, see TS 36.213 (7.2.3). \vr{[-1..6]}\n Actual value = IE value * 2 [dB].
/// Parameter: \f$\Delta_\text{offset}\f$, see TS 36.213 (7.2.3). {[-1..6]}\n Actual value = IE value * 2 [dB].
int8_t nomPDSCH_RS_EPRE_Offset;
CQI_REPORTPERIODIC_NB_IoT CQI_ReportPeriodic;
} CQI_REPORT_CONFIG_NB_IoT;
/// SoundingRS-UL-ConfigDedicated Information Element from 36.331 RRC spec
typedef struct {
/// Parameter: \f$B_\text{SRS}\f$, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). \vr{[0..3]} \note the specification sais it is an enumerated value.
/// Parameter: \f$B_\text{SRS}\f$, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). {[0..3]} \note the
/// specification sais it is an enumerated value.
uint8_t srs_Bandwidth;
/// Parameter: SRS hopping bandwidth \f$b_\text{hop}\in\{0,1,2,3\}\f$, see TS 36.211 (5.5.3.2) \vr{[0..3]} \note the specification sais it is an enumerated value.
/// Parameter: SRS hopping bandwidth \f$b_\text{hop}\in\{0,1,2,3\}\f$, see TS 36.211 (5.5.3.2) {[0..3]} \note the specification
/// sais it is an enumerated value.
uint8_t srs_HoppingBandwidth;
/// Parameter: \f$n_\text{RRC}\f$, see TS 36.211 (5.5.3.2). \vr{[0..23]}
/// Parameter: \f$n_\text{RRC}\f$, see TS 36.211 (5.5.3.2). {[0..23]}
uint8_t freqDomainPosition;
/// Parameter: Duration, see TS 36.213 (8.2). \vr{[0..1]} 0 corresponds to "single" and 1 to "indefinite".
/// Parameter: Duration, see TS 36.213 (8.2). {[0..1]} 0 corresponds to "single" and 1 to "indefinite".
uint8_t duration;
/// Parameter: \f$k_\text{TC}\in\{0,1\}\f$, see TS 36.211 (5.5.3.2). \vr{[0..1]}
/// Parameter: \f$k_\text{TC}\in\{0,1\}\f$, see TS 36.211 (5.5.3.2). {[0..1]}
uint8_t transmissionComb;
/// Parameter: \f$I_\text{SRS}\f$, see TS 36.213 (table 8.2-1). \vr{[0..1023]}
/// Parameter: \f$I_\text{SRS}\f$, see TS 36.213 (table 8.2-1). {[0..1023]}
uint16_t srs_ConfigIndex;
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). {[0..7]} \note the specification sais it is an enumerated
/// value.
uint8_t cyclicShift;
// Parameter: internal implementation: UE SRS configured
uint8_t srsConfigDedicatedSetup;
@@ -204,9 +214,9 @@ typedef enum {
/// SchedulingRequestConfig Information Element from 36.331 RRC spec
typedef struct {
/// Parameter: \f$n^{(1)}_\text{PUCCH,SRI}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
/// Parameter: \f$n^{(1)}_\text{PUCCH,SRI}\f$, see TS 36.213 (10.1). {[0..2047]}
uint16_t sr_PUCCH_ResourceIndex;
/// Parameter: \f$I_\text{SR}\f$, see TS 36.213 (10.1). \vr{[0..155]}
/// Parameter: \f$I_\text{SR}\f$, see TS 36.213 (10.1). {[0..155]}
uint8_t sr_ConfigIndex;
/// Parameter for SR transmission in TS 36.321 (5.4.4). \details The value n4 corresponds to 4 transmissions, n8 corresponds to 8 transmissions and so on.
DSR_TRANSMAX_NB_IoT_t dsr_TransMax;
@@ -404,7 +414,7 @@ typedef struct {
typedef struct {
/// nprach_CP_Length_r13, for the CP length(unit us) only 66.7 and 266.7 is implemented
uint16_t nprach_CP_Length;
/// The criterion for UEs to select a NPRACH resource. Up to 2 RSRP threshold values can be signalled. \vr{[1..2]}
/// The criterion for UEs to select a NPRACH resource. Up to 2 RSRP threshold values can be signalled. {[1..2]}
rsrp_ThresholdsNPrachInfoList *rsrp_ThresholdsPrachInfoList;
/// NPRACH Parameters List
NPRACH_List_NB_IoT_t nprach_ParametersList;
@@ -413,7 +423,7 @@ typedef struct {
/// NPDSCH-ConfigCommon from 36.331 RRC spec
typedef struct {
///see TS 36.213 (16.2). \vr{[-60..50]}\n Provides the downlink reference-signal EPRE. The actual value in dBm.
/// see TS 36.213 (16.2). {[-60..50]}\n Provides the downlink reference-signal EPRE. The actual value in dBm.
uint16_t nrs_Power;
} NPDSCH_CONFIG_COMMON;
@@ -433,11 +443,11 @@ typedef struct{
/// UL-ReferenceSignalsNPUSCH from 36.331 RRC spec
typedef struct {
/// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). \vr{[0..1]}
/// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). {[0..1]}
uint8_t groupHoppingEnabled;
/// , see TS 36.211 (5.5.1.3). \vr{[0..29]}
/// , see TS 36.211 (5.5.1.3). {[0..29]}
uint8_t groupAssignmentNPUSCH;
/// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). \vr{[0..7]}
/// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). {[0..7]}
uint8_t cyclicShift;
/// nPRS for cyclic shift of DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
uint8_t nPRS[20];
@@ -454,7 +464,7 @@ typedef struct {
uint8_t ack_NACK_NumRepetitions_Msg4[3];
/// SRS SubframeConfiguration. See TS 36.211 [21, table 5.5.3.3-1]. Value sc0 corresponds to value 0, sc1 to value 1 and so on.
uint8_t srs_SubframeConfig;
/// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). \vr{[0..98]}
/// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). {[0..98]}
DMRS_CONFIG_t dmrs_Config;
/// Ref signals configuration
UL_REFERENCE_SIGNALS_NPUSCH_t ul_ReferenceSignalsNPUSCH;
+4 -3
View File
@@ -37,6 +37,7 @@
* @{
* @defgroup _PHY_RF_INTERFACE_ PHY - RF Interface
* @{
* @ingroup _PHY_RF_INTERFACE_
* @{
* @defgroup _GENERIC_PHY_RF_INTERFACE_ Generic PHY - RF Interface
@@ -44,13 +45,13 @@
* @defgroup _BLADERF_PHY_RF_INTERFACE_ PHY - BLADERF RF Interface
* @defgroup _LMSSDR_PHY_RF_INTERFACE_ PHY - LMSSDR RF Interface
* @}
*
* @}
* @ingroup _ref_implementation_
* @{
* This module is responsible for defining the generic interface between PHY and RF Target
* @}
* @defgroup _openair1_ openair1 Reference Implementation
* @defgroup _openair1_ openair1 Reference Implementation
* @ingroup _ref_implementation_
* @{
+2 -349
View File
@@ -33,352 +33,10 @@
#ifndef __PHY_IMPLEMENTATION_DEFS_NB_IOT_H__
#define __PHY_IMPLEMENTATION_DEFS_NB_IOT_H__
#include "common/openairinterface5g_limits.h"
/** @defgroup _ref_implementation_ OpenAirInterface LTE Implementation
* @{
* @defgroup _PHY_RF_INTERFACE_ PHY - RF Interface
* @ingroup _PHY_RF_INTERFACE_
* @{
* @defgroup _GENERIC_PHY_RF_INTERFACE_ Generic PHY - RF Interface
* @defgroup _USRP_PHY_RF_INTERFACE_ PHY - USRP RF Interface
* @defgroup _BLADERF_PHY_RF_INTERFACE_ PHY - BLADERF RF Interface
* @defgroup _LMSSDR_PHY_RF_INTERFACE_ PHY - LMSSDR RF Interface
* @}
*
* @ingroup _ref_implementation_
* @{
* This module is responsible for defining the generic interface between PHY and RF Target
* @}
* @defgroup _openair1_ openair1 Reference Implementation
* @ingroup _ref_implementation_
* @{
* @defgroup _physical_layer_ref_implementation_ Physical Layer Reference Implementation
* @ingroup _openair1_
* @{
* @defgroup _PHY_STRUCTURES_ Basic Structures and Memory Initialization
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for defining and initializing the PHY variables during static configuration of OpenAirInterface.
* @}
* @defgroup _PHY_DSP_TOOLS_ DSP Tools
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for basic signal processing related to inner-MODEM processing.
* @}
* @defgroup _PHY_MODULATION_ Modulation and Demodulation
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for procedures related to OFDMA modulation and demodulation.
* @}
* @defgroup _PHY_PARAMETER_ESTIMATION_BLOCKS_ Parameter Estimation
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for procedures related to OFDMA frequency-domain channel estimation for LTE Downlink Channels.
* @}
* @defgroup _PHY_CODING_BLOCKS_ Channel Coding/Decoding Functions
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for procedures related to channel coding/decoding, rate-matching, segementation and interleaving.
* @}
* @defgroup _PHY_TRANSPORT_ Transport/Physical Channel Processing
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for defining and processing the PHY procedures (TX/RX) related to transport and physical channels.
* @}
* @defgroup _PHY_PROCEDURES_ Physical Layer Procedures
* @ingroup _physical_layer_ref_implementation_
* @{
* This module is responsible for defining and processing the PHY procedures (TX/RX) related to transport and physical channels.
* @}
* @}
* @}
* @}
*/
//#include "types.h"
/*
#define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size)
#define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
#define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL)
#define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS)
#define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2)
#define HALF_NUMBER_OF_USEFUL_CARRIERS (NUMBER_OF_USEFUL_CARRIERS>>1)
#define HALF_NUMBER_OF_USEFUL_CARRIERS_BYTES (HALF_NUMBER_OF_USEFUL_CARRIERS>>2)
#define FIRST_CARRIER_OFFSET (HALF_NUMBER_OF_USEFUL_CARRIERS+NUMBER_OF_ZERO_CARRIERS)
#define NUMBER_OF_OFDM_SYMBOLS_PER_SLOT (NUMBER_OF_SYMBOLS_PER_FRAME/LTE_SLOTS_PER_FRAME)
#ifdef EMOS
#define EMOS_SCH_INDEX 1
#endif //EMOS
#define EXTENSION_TYPE (PHY_config->PHY_framing.Extension_type)
#define NUMBER_OF_OFDM_CARRIERS_BYTES NUMBER_OF_OFDM_CARRIERS*4
//#define NUMBER_OF_USEFUL_CARRIERS_BYTES NUMBER_OF_USEFUL_CARRIERS*4
#define HALF_NUMBER_OF_USER_CARRIERS_BYTES NUMBER_OF_USEFUL_CARRIERS/2
#define CYCLIC_PREFIX_LENGTH (frame_parms->nb_prefix_samples)
#define CYCLIC_PREFIX_LENGTH_SAMPLES (CYCLIC_PREFIX_LENGTH*2)
#define CYCLIC_PREFIX_LENGTH_BYTES (CYCLIC_PREFIX_LENGTH*4)
#define CYCLIC_PREFIX_LENGTH0 (frame_parms->nb_prefix_samples0)
#define CYCLIC_PREFIX_LENGTH_SAMPLES0 (CYCLIC_PREFIX_LENGTH0*2)
#define CYCLIC_PREFIX_LENGTH_BYTES0 (CYCLIC_PREFIX_LENGTH0*4)
#define OFDM_SYMBOL_SIZE_SAMPLES ((NUMBER_OF_OFDM_CARRIERS + CYCLIC_PREFIX_LENGTH)*2) // 16-bit units (i.e. real samples)
#define OFDM_SYMBOL_SIZE_SAMPLES0 ((NUMBER_OF_OFDM_CARRIERS + CYCLIC_PREFIX_LENGTH0)*2) // 16-bit units (i.e. real samples)
#define OFDM_SYMBOL_SIZE_SAMPLES_MAX 4096 // 16-bit units (i.e. real samples)
#define OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES (OFDM_SYMBOL_SIZE_SAMPLES/2) // 32-bit units (i.e. complex samples)
#define OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0 (OFDM_SYMBOL_SIZE_SAMPLES0/2) // 32-bit units (i.e. complex samples)
#define OFDM_SYMBOL_SIZE_SAMPLES_NO_PREFIX ((NUMBER_OF_OFDM_CARRIERS)*2)
#define OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX (OFDM_SYMBOL_SIZE_SAMPLES_NO_PREFIX/2)
#define OFDM_SYMBOL_SIZE_BYTES (OFDM_SYMBOL_SIZE_SAMPLES*2)
#define OFDM_SYMBOL_SIZE_BYTES0 (OFDM_SYMBOL_SIZE_SAMPLES0*2)
#define OFDM_SYMBOL_SIZE_BYTES_NO_PREFIX (OFDM_SYMBOL_SIZE_SAMPLES_NO_PREFIX*2)
#define SLOT_LENGTH_BYTES (frame_parms->samples_per_tti<<1) // 4 bytes * samples_per_tti/2
#define SLOT_LENGTH_BYTES_NO_PREFIX (OFDM_SYMBOL_SIZE_BYTES_NO_PREFIX * NUMBER_OF_OFDM_SYMBOLS_PER_SLOT)
#define FRAME_LENGTH_COMPLEX_SAMPLES (frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
#define FRAME_LENGTH_SAMPLES (FRAME_LENGTH_COMPLEX_SAMPLES*2)
#define FRAME_LENGTH_SAMPLES_NO_PREFIX (NUMBER_OF_SYMBOLS_PER_FRAME*OFDM_SYMBOL_SIZE_SAMPLES_NO_PREFIX)
#define FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX (FRAME_LENGTH_SAMPLES_NO_PREFIX/2)
#define NUMBER_OF_CARRIERS_PER_GROUP (NUMBER_OF_USEFUL_CARRIERS/NUMBER_OF_FREQUENCY_GROUPS)
#define RX_PRECISION (16)
#define LOG2_RX_PRECISION (4)
#define RX_OUTPUT_SHIFT (4)
#define SAMPLE_SIZE_BYTES 2 // 2 bytes/real sample
#define FRAME_LENGTH_BYTES (FRAME_LENGTH_SAMPLES * SAMPLE_SIZE_BYTES) // frame size in bytes
#define FRAME_LENGTH_BYTES_NO_PREFIX (FRAME_LENGTH_SAMPLES_NO_PREFIX * SAMPLE_SIZE_BYTES) // frame size in bytes
#define FFT_SCALE_FACTOR 8 // Internal Scaling for FFT
#define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot
#define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports
#define TARGET_RX_POWER 50 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 65 // Maximum digital power, such that signal does not saturate (value found by simulation)
#define TARGET_RX_POWER_MIN 35 // Minimum digital power, anything below will be discarded (value found by simulation)
//the min and max gains have to match the calibrated gain table
//#define MAX_RF_GAIN 160
//#define MIN_RF_GAIN 96
#define MAX_RF_GAIN 200
#define MIN_RF_GAIN 80
#define PHY_SYNCH_OFFSET ((OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES)-1) // OFFSET of BEACON SYNCH
#define PHY_SYNCH_MIN_POWER 1000
#define PHY_SYNCH_THRESHOLD 100
*/
#define ONE_OVER_SQRT2_Q15_NB_IoT 23170
/*
#define ONE_OVER_2_Q15 16384
// QAM amplitude definitions
/// First Amplitude for QAM16 (\f$ 2^{15} \times 2/\sqrt{10}\f$)
#define QAM16_n1 20724
/// Second Amplitude for QAM16 (\f$ 2^{15} \times 1/\sqrt{10}\f$)
#define QAM16_n2 10362
///First Amplitude for QAM64 (\f$ 2^{15} \times 4/\sqrt{42}\f$)
#define QAM64_n1 20225
///Second Amplitude for QAM64 (\f$ 2^{15} \times 2/\sqrt{42}\f$)
#define QAM64_n2 10112
///Third Amplitude for QAM64 (\f$ 2^{15} \times 1/\sqrt{42}\f$)
#define QAM64_n3 5056
/// First Amplitude for QAM16 for TM5 (\f$ 2^{15} \times 2/sqrt(20)\f$)
#define QAM16_TM5_n1 14654
/// Second Amplitude for QAM16 for TM5 Receiver (\f$ 2^{15} \times 1/\sqrt{20}\f$)
#define QAM16_TM5_n2 7327
///First Amplitude for QAM64 (\f$ 2^{15} \times 4/\sqrt{84}\f$)
#define QAM64_TM5_n1 14301
///Second Amplitude for QAM64 (\f$ 2^{15} \times 2/\sqrt{84}\f$)
#define QAM64_TM5_n2 7150
///Third Amplitude for QAM64 for TM5 Receiver (\f$ 2^{15} \times 1/\sqrt{84}\f$)
#define QAM64_TM5_n3 3575
#ifdef BIT8_RXMUX
#define PERROR_SHIFT 0
#else
#define PERROR_SHIFT 10
#endif
#define BIT8_TX_SHIFT 2
#define BIT8_TX_SHIFT_DB 12
//#define CHBCH_RSSI_MIN -75
#ifdef BIT8_TX
#define AMP 128
#else
#define AMP 512//1024 //4096
#endif
#define AMP_OVER_SQRT2 ((AMP*ONE_OVER_SQRT2_Q15)>>15)
#define AMP_OVER_2 (AMP>>1)
/// Threshold for PUCCH Format 1 detection
#define PUCCH1_THRES 0
/// Threshold for PUCCH Format 1a/1b detection
#define PUCCH1a_THRES 4
/// Data structure for transmission.
typedef struct {
/// RAW TX sample buffer
char *TX_DMA_BUFFER[2];
} TX_VARS ;
/// Data structure for reception.
typedef struct {
/// RAW TX sample buffer
char *TX_DMA_BUFFER[2];
/// RAW RX sample buffer
int *RX_DMA_BUFFER[2];
} TX_RX_VARS;
//! \brief Extension Type /
typedef enum {
CYCLIC_PREFIX,
CYCLIC_SUFFIX,
ZEROS,
NONE
} Extension_t;
/// Measurement Variables
*/
#define NUMBER_OF_SUBBANDS_MAX_NB_IoT 13
/*
#define NUMBER_OF_HARQ_PID_MAX 8
#define MAX_FRAME_NUMBER 0x400
#include "common/openairinterface5g_limits.h"
#define NUMBER_OF_RN_MAX 3
typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_relay} relaying_type_t;
typedef struct {
//unsigned int rx_power[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX]; //! estimated received signal power (linear)
//unsigned short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX]; //! estimated received signal power (dB)
//unsigned short rx_avg_power_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //! estimated avg received signal power (dB)
// RRC measurements
uint32_t rssi;
int n_adj_cells;
unsigned int adj_cell_id[6];
uint32_t rsrq[7];
uint32_t rsrp[7];
float rsrp_filtered[7]; // after layer 3 filtering
float rsrq_filtered[7];
// common measurements
//! estimated noise power (linear)
unsigned int n0_power[NB_ANTENNAS_RX];
//! estimated noise power (dB)
unsigned short n0_power_dB[NB_ANTENNAS_RX];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! total estimated noise power (dB)
unsigned short n0_power_tot_dB;
//! average estimated noise power (linear)
unsigned int n0_power_avg;
//! average estimated noise power (dB)
unsigned short n0_power_avg_dB;
//! total estimated noise power (dBm)
short n0_power_tot_dBm;
// UE measurements
//! estimated received spatial signal power (linear)
int rx_spatial_power[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
int rx_power[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
unsigned short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX/RX antennas)
int rx_power_tot[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
/// estimated received signal power (sum over all TX/RX antennas)
unsigned short rx_power_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
//! estimated received signal power (sum of all TX/RX antennas, time average)
int rx_power_avg[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated received signal power (sum of all TX/RX antennas, time average, in dB)
unsigned short rx_power_avg_dB[NUMBER_OF_CONNECTED_eNB_MAX];
/// SINR (sum of all TX/RX antennas, in dB)
int wideband_cqi_tot[NUMBER_OF_CONNECTED_eNB_MAX];
/// SINR (sum of all TX/RX antennas, time average, in dB)
int wideband_cqi_avg[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int rx_correlation[NUMBER_OF_CONNECTED_eNB_MAX][2];
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int rx_correlation_dB[NUMBER_OF_CONNECTED_eNB_MAX][2];
/// Wideband CQI (sum of all RX antennas, in dB, for precoded transmission modes (3,4,5,6), up to 4 spatial streams)
int precoded_cqi_dB[NUMBER_OF_CONNECTED_eNB_MAX+1][4];
/// Subband CQI per RX antenna (= SINR)
int subband_cqi[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX][NUMBER_OF_SUBBANDS_MAX];
/// Total Subband CQI (= SINR)
int subband_cqi_tot[NUMBER_OF_CONNECTED_eNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Subband CQI in dB (= SINR dB)
int subband_cqi_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX][NUMBER_OF_SUBBANDS_MAX];
/// Total Subband CQI
int subband_cqi_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Wideband PMI for each RX antenna
int wideband_pmi_re[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// Wideband PMI for each RX antenna
int wideband_pmi_im[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
///Subband PMI for each RX antenna
int subband_pmi_re[NUMBER_OF_CONNECTED_eNB_MAX][NUMBER_OF_SUBBANDS_MAX][NB_ANTENNAS_RX];
///Subband PMI for each RX antenna
int subband_pmi_im[NUMBER_OF_CONNECTED_eNB_MAX][NUMBER_OF_SUBBANDS_MAX][NB_ANTENNAS_RX];
/// chosen RX antennas (1=Rx antenna 1, 2=Rx antenna 2, 3=both Rx antennas)
unsigned char selected_rx_antennas[NUMBER_OF_CONNECTED_eNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Wideband Rank indication
unsigned char rank[NUMBER_OF_CONNECTED_eNB_MAX];
/// Number of RX Antennas
unsigned char nb_antennas_rx;
/// DLSCH error counter
// short dlsch_errors;
} PHY_MEASUREMENTS;
*/
typedef enum {no_relay_NB_IoT=1,unicast_relay_type1_NB_IoT,unicast_relay_type2_NB_IoT, multicast_relay_NB_IoT} relaying_type_t_NB_IoT;
typedef struct {
//unsigned int rx_power[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX]; //! estimated received signal power (linear)
@@ -526,10 +184,5 @@ typedef struct {
int subband_cqi_tot_dB[NUMBER_OF_UE_MAX_NB_IoT][100];
} PHY_MEASUREMENTS_eNB_NB_IoT;
/*
#define MCS_COUNT 28
#define MCS_TABLE_LENGTH_MAX 64
*/
#endif //__PHY_IMPLEMENTATION_DEFS_H__
/**@}
*/
#endif //__PHY_IMPLEMENTATION_DEFS_H__
+10 -10
View File
@@ -19,16 +19,16 @@
* contact@openairinterface.org
*/
/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
/*! \file phy_procedures_lte_common.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "SCHED/sched_common_extern.h"
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file phy_procedures_lte_eNB.c
/*! \file phy_procedures_lte_eNb.c
* \brief Implementation of eNB procedures from 36.213 LTE specifications / FeMBMS 36.231 LTE procedures v14.2
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas, J. Morgade
* \date 2011
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file phy_procedures_lte_eNB.c
/*! \file prach_procedures.c
* \brief Implementation of eNB procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas
* \date 2011
+6 -19
View File
@@ -85,11 +85,9 @@ enum openair_HARQ_TYPE {
* @{
*/
/*! \brief Scheduling for eNB TX procedures in normal subframes.
@param phy_vars_eNB Pointer to eNB variables on which to act
@param abstraction_flag Indicator of PHY abstraction
@param proc
@param do_meas Do inline timing measurement
*/
void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc,int do_meas);
@@ -100,15 +98,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc,int d
*/
void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
/*! \brief Scheduling for eNB TX procedures in TDD S-subframes.
@param phy_vars_eNB Pointer to eNB variables on which to act
@param proc Pointer to RXn-TXnp4 proc information
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
*/
/*! \brief Scheduling for eNB RX common procedures in normal subframes.
@param phy_vars_eNB Pointer to eNB variables on which to act
@param abstraction_flag Indicator of PHY abstraction
@param proc is context
*/
void phy_procedures_eNB_common_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
@@ -120,11 +112,12 @@ void phy_procedures_eNB_S_TX(PHY_VARS_eNB *phy_vars_eNB);
/*! \brief Scheduling for eNB RX procedures in TDD S-subframes.
@param phy_vars_eNB Pointer to eNB variables on which to act
@param proc
*/
void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
/*! \brief Scheduling for eNB PRACH RX procedures
@param phy_vars_eNB Pointer to eNB variables on which to act
@param eNB Pointer to eNB variables on which to act
@param br_flag indicator for eMTC PRACH
*/
@@ -166,12 +159,6 @@ void get_Msg3_alloc_ret(LTE_DL_FRAME_PARMS *frame_parms,
*/
uint8_t get_Msg3_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t current_subframe);
/*! \brief Get ULSCH harq_pid from PHICH subframe
@param frame_parms Pointer to DL Frame Parameters
@param subframe subframe of PHICH
@returns harq_pid (0 ... 7)
*/
/*! \brief Function to indicate failure of contention resolution or RA procedure. It places the UE back in PRACH mode.
@param Mod_id Instance index of UE
@param CC_id Component Carrier Index
@@ -181,6 +168,7 @@ void ra_failed(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/*! \brief Indicates the SR TXOp in current subframe for eNB and particular UE index. Implements Table 10.1-5 from 36.213.
@param phy_vars_eNB Pointer to eNB variables
@param proc
@param UE_id ID of UE which may be issuing the SR
@returns 1 if TXOp is active.
*/
@@ -218,8 +206,7 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
void compute_srs_pos(frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
void release_rnti_of_phy(module_id_t mod_id);
/*@}*/
/**@}*/
#endif
+1 -1
View File
@@ -161,7 +161,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
notifiedFIFO_elt_t *res=NULL;
processingData_L1tx_t *msgTx=NULL;
if (!gNB->reorder_thread_disable) {
res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
res = pullNotifiedFIFO(&gNB->L1_tx_free);
if (res == NULL)
return; // Tpool has been stopped, nothing to process
msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
+5 -16
View File
@@ -94,7 +94,7 @@ typedef struct {
/*! \brief Scheduling for UE TX procedures in normal subframes.
@param ue Pointer to UE variables on which to act
@param proc Pointer to RXn-TXnp4 proc information
@param eNB_id Local id of eNB on which to act
@param phy_data
*/
void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_data_tx_t *phy_data);
@@ -113,18 +113,15 @@ int phy_procedures_slot_parallelization_nrUE_RX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_p
void processSlotTX(void *arg);
/*! \brief UE PRACH procedures.
@param
@param
@param
*/
void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc);
int8_t nr_find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
/*! \brief UL time alignment procedures for TA application
@param PHY_VARS_NR_UE ue
@param int slot_tx
@param int frame_tx
@param ue
@param slot_tx
@param frame_tx
*/
void ue_ta_procedures(PHY_VARS_NR_UE *ue, int slot_tx, int frame_tx);
@@ -138,10 +135,6 @@ int is_ssb_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_
bool is_csi_rs_in_symbol(fapi_nr_dl_config_csirs_pdu_rel15_t csirs_config_pdu, int symbol);
/*! \brief This function prepares the dl indication to pass to the MAC
@param
@param
@param
@param
*/
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
@@ -153,10 +146,6 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
/*@}*/
/*! \brief This function prepares the dl rx indication
@param
@param
@param
@param
*/
void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
uint8_t pdu_type,
@@ -192,4 +181,4 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t r
void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
#endif
/** @}*/
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file phy_emulation.h
/*! \file defs.h
* \brief specifies the data structure and variable for phy emulation
* \author Navid Nikaein, Raymomd Knopp and Hicham Anouar
* \date 2011

Some files were not shown because too many files have changed in this diff Show More