0% found this document useful (0 votes)
13 views10 pages

Amarisoft eNB/UE Driver SDK Guide

The document describes an SDK for developing a driver for an Amarisoft eNB/UE radio equipment. It outlines callbacks for exchanging IQ samples, details on timestamps, provides examples of optimized IQ processing and an example dummy driver. It also describes a remote API for sending and receiving messages to interact with the software component.

Uploaded by

Sergey Borovoy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views10 pages

Amarisoft eNB/UE Driver SDK Guide

The document describes an SDK for developing a driver for an Amarisoft eNB/UE radio equipment. It outlines callbacks for exchanging IQ samples, details on timestamps, provides examples of optimized IQ processing and an example dummy driver. It also describes a remote API for sending and receiving messages to interact with the software component.

Uploaded by

Sergey Borovoy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

TRX SDK

Version: 2023-06-08
i

Table of Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 IQ samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3 Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1 RX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 TX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

4 Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

5 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

6 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

7 Optimizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

8 Remote API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.1 Receive messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.2 Send messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1

1 Introduction
Here is how to implement a Amarisoft eNB/UE driver to communicate with a radio equipment
and exchange IQ samples.
It consists in providing to eNB software a shared library where specific callbacks will be imple-
mented.
You will find an example driver (trx example.c) to start developing your driver and Makefile to
compile it.

This driver may be implemented in any language. It must respect the standard C API
provided as trx_driver.h
The driver will be launched in user mode.
2

2 IQ samples
Amarisoft IQ are coded with 32 bits float type and have following range:
-1.0 <= IQ <= 1.0
It is up to you to adapt level to your specific needs.
As it may require a lot of CPU time, SSE optimized sample code is provided (See [Optimiza-
tions], page 6) to help you.

Gain of uplink IQ is direclty handled by eNB software so no specific treatment is needed.


3

3 Callbacks
Two main callbacks are set to exchange IQ: one for reading and another one for writing.

3.1 RX
Reading process is clock master:
• The read callback (trx_read_func) is called regularly to get IQ samples.
• It has to block until at least 1 sample is available and must return at most count samples.
• The count argument value depends on sample rate and is at most 4096 samples.
• The callback provides clock information using "ptimestamp" pointer.
It must be expressed in samples so that time can be retrieved by stack using sample rate.
The timestamp wil be used by stack to provide send time to write process.

3.2 TX
• The write callback (trx_write_func) is called regularly and timestamp information is
direclty calculated from reading process.
• This timestamp information represents when the radio head must send samples to the air.
It is important to be as precise as possible to keep synchronization between TX and RX.
• The count argument that represent number of samples to send can be configured by im-
plementing with trx_get_tx_samples_per_packet_func callback.
Else, the stack will estimate this value depending on sample rate
• If samples pointer is NULL, this means TX has to be disabled (must not transmit anything)
during the time represented by count parameter. The flag TRX_WRITE_FLAG_PADDING will
be also set. This case only happens in TDD mode.
• The write callback must be as fast as possible.
4

4 Timestamps
Timestamp unit is sample, and is used to convert to time depending on sample rate provided:
<time> = <timestamp> / <sample_rate>
Note that timestamps provided by trx_read API will be used by stack to generate a clock.
This is the only clock the stack will use: it does not rely on PC clock are any network or
hardware component.
As a result, there is no constraints on the speed of IQ sample feeding. It does not have to be
real time or linear.
You can even pause the system and resume it later to interface with non real time components.
5

5 API
Amarisoft driver API is located in trx driver.h.
6

6 Example
A dummy driver example is implemented in trx_example.c.
trx_example is a dummy transceiver driver for the Amarisoft LTE eNodeB. It simulates
zero samples coming from a source synchronized to the PC clock and optionally outputs the
maximum amplitude of the downlink I/Q samples.
You can compile the trx example driver by just typing make.
Then copy trx_example.so to the lteenb directory.
You can enable it with the following property in the eNodeB configuration:
//include "rf_driver/[Link]",

rf_driver: {
name: "example",
dump_max: 1, /* enable maximum amplitude output */
},
tx_gain: 0,
rx_gain: 0,
sample_rate: 11.52, /* set the sample rate to 11.52 MHz */
7

7 Optimizations
For fast IQ samples convertion, optimized routine are available in convert16_see.c.
This is a example code of fixed point/floating point numbers optimized with SSE instructions.
This file must be compiled with "-msse4.1" gcc option
For more information on Intel SSE/AVX: https: / / software . intel . com / sites /
landingpage/IntrinsicsGuide/
8

8 Remote API
Since version 14 of API you can receive and send messages via remote API.
Please refer to the remote API section of your software component for usage.
trx_msg_recv_func can be called from a different thread than read and write functions.
TRXMsg API is thread safe.

8.1 Receive messages


All trx messages will be sent to trx_msg_recv_func.
Use TRXMsg->get_double and TRXMsg->get_string API to get data from incoming message.
Use TRXMsg->set_double and TRXMsg->set_string API to set data for response.

Then use TRXMsg->send API when your response is ready to be sent.


If you need to send response later, use TRXMsg->set_timeout API, then call TRXMsg->send
API when your response is ready to be sent.
The timeout_cb will be called when timeout occurs. You need to call TRXMsg->send to free
resources.

8.2 Send messages


To send a message, call trx_msg_send_func.
This will create a message that you can populate with TRXMsg->set_double and TRXMsg->set_
string API.
Then call TRXMsg->send API to send your message.
The message type will be trx and the client must register to this type of message to receive
it.

Common questions

Powered by AI

In the TRX SDK, the sample rate is a critical factor influencing the operation of IQ sample processing. It determines the maximum count of IQ samples that can be handled by the RX callback at any given time, which is capped at 4096 samples. The sample rate also serves as an essential parameter for converting timestamps into time units, which is crucial for synchronizing reception and transmission processes. Accurate configuration of the sample rate ensures that the system maintains synchronization and data integrity during IQ sample exchange .

The TRX SDK provides SSE-optimized sample code to enhance the processing efficiency of IQ samples, particularly crucial given the potential CPU demands. SSE (Streaming SIMD Extensions) optimizations, present in the convert16_see.c file, allow for efficient fixed-point and floating-point conversions using SIMD operations. These optimizations can significantly decrease processing time for IQ samples, thus improving overall system performance. Compiling these optimizations with the '-msse4.1' gcc option is necessary to fully utilize SSE capabilities, which can lead to faster and more responsive driver performance in handling large volumes of data .

The RX callback (trx_read_func) functions as the clock master and is responsible for regularly acquiring IQ samples. It blocks execution until at least one sample is available, returning up to a maximum of 4096 samples based on the sample rate. The RX callback also provides essential timestamp information to maintain synchronization . The TX callback (trx_write_func) is responsible for sending IQ samples to the air, using timestamp information derived from the RX process to ensure transmission is synchronized. It must be fast to maintain performance, and if the samples pointer is NULL, it indicates that the TX should be disabled temporarily .

The trx_example.c serves as a dummy transceiver driver, which simulates zero samples and optionally outputs the maximum amplitude of downlink I/Q samples. It is tailored for an Amarisoft LTE eNodeB environment. To integrate the driver, it is compiled by executing 'make', and the resulting shared object, trx_example.so, is then copied to the lteenb directory. Configuration in the eNodeB setup is achieved by specifying properties such as 'rf_driver', 'dump_max', 'tx_gain', and 'sample_rate' in the configuration file .

SSE (Streaming SIMD Extensions) instructions are utilized in the TRX SDK through the convert16_see.c file, which provides optimized routines for converting fixed-point and floating-point IQ samples using SIMD operations. These instructions allow parallel processing of data, significantly enhancing computation speed and efficiency. By compiling these routines with the '-msse4.1' gcc option, developers can achieve faster conversions, thereby improving overall performance when handling large volumes of IQ data .

Timestamps in the TRX SDK are based on the unit of IQ samples, which are converted to time using the provided sample rate. This system enables the stack to generate a clock for synchronization purposes, without relying on a PC clock or other hardware components. This approach allows for flexibility in IQ sample feeding, as the processing does not need to be real-time or linear, and can even accommodate pauses. This design is beneficial as it facilitates integration with non-real-time components and avoids dependencies on external timing sources .

The ability of trx_msg_recv_func to operate from a different thread than the read and write functions in the TRX SDK significantly enhances system flexibility and responsiveness. This capability allows the reception of messages to be decoupled from the primary IO operations, leading to more efficient CPU utilization and reduced bottlenecks, especially under high-load conditions. It ensures that message handling does not interfere with the time-sensitive operations of reading and writing IQ samples, thus preserving the latency and throughput of critical data paths .

The TRX SDK facilitates remote communication via its Remote API, allowing messages to be sent and received using trx_msg_recv_func and trx_msg_send_func functions. The recv function collects incoming messages and uses APIs like TRXMsg->get_double and TRXMsg->get_string to extract data, while the send function populates and transmits messages using TRXMsg->set_double and TRXMsg->set_string APIs. Thread safety is ensured as the TRXMsg API is designed to be thread-safe, enabling operations to be conducted from different threads without causing data races or inconsistencies .

The TRX SDK automatically manages the gain of uplink IQ samples within the eNB software, eliminating the need for developers to implement specific gain control mechanisms in their drivers. This design reduces the complexity of driver development, as developers can rely on the eNB's built-in capabilities for handling gain adjustments. This approach streamlines the driver development process by isolating gain management from the transceiver driver .

The TRX SDK facilitates testing and debugging through a structured API, detailed in the trx_driver.h file, and example drivers such as trx_example.c. These resources guide developers in implementing and compiling drivers (using Makefile), which can simulate realistic transceiver operations like zero sample handling. By providing a standard API and a reference example, developers can quickly setup and evaluate connectivity with radio equipment, benchmark performance, and troubleshoot potential issues in a simulated environment before deployment .

You might also like