Follow+Star Public Account, don’t miss the wonderful content
Direct Source | RTThread IoT Operating System
Original link:
https://www.ceva-dsp.com/ourblog/iot-dsp-and-rtos-a-perfect-match/
The rapid development of the IoT has exceeded almost everyone’s imagination, with thousands of devices connecting to the network every day. In the face of such enormous market demand, traditional technologies have long been overwhelmed, while the new generation of digital signal processing has higher requirements for computing power and lower power consumption. (It is the viewpoint of this article that the new generation of hybrid DSP technology equipped with RTOS is the best choice for IoT)
With the rapid growth of new markets and their demand for new technologies, the utilization of some technologies is increasing. Digital Signal Processing (DSP) is one such technology, which can take the form of chips or as IP cores in System-on-Chip (SoC). Although DSP has been around for a long time, the functionalities supported by the new generation of DSP are crucial for meeting specific market demands, such as IoT (Internet of Things). Given the inherent nature of many IoT devices, they typically utilize Real-Time Operating Systems (RTOS).

Ori Leibovich, Senior Manager of Embedded Development at CEVA
Evolution of DSP
DSP is used to convert and process analog signals from the real world, a processing operation accomplished through complex signal processing algorithms. As a technology that emerged in the 1980s, DSP has made significant advancements in hardware functionality, software development tools, and infrastructure. Early algorithms were programmed onto DSPs in assembly language. As the DSP market expanded and algorithms became increasingly complex, its architecture evolved, facilitating the development of high-level language compilers.
Chips with embedded DSP cores generally integrate on-chip memory, which is usually large enough to hold the entire set of programs required to execute dedicated tasks. The application range of the new generation of DSP includes audio/voice processing, image processing, telecommunications signal processing, sensor data processing, and system control. Today’s IoT market nearly encompasses various combinations of many previous use cases. Industry analysis firm Markets and Markets predicts that by 2027, the global IoT technology market will grow to $566.4 billion. In the face of such a vast IoT market, the new generation of DSP technology is crucial.
Why DSP is Ideal for IoT Devices?
The IoT collects data through various types of sensors to achieve communication and connectivity among all things in the real world. DSP analyzes and processes the continuously changing signals from sensors. Today, sensor hub DSPs (such as CEVA-SensPro2) have emerged to process and fuse information from multiple sensors and are used for context-aware neural network inference. DSP is designed to analyze and process various signals from the real world, including audio and video, temperature, pressure, or humidity, with tasks involving precise and accurate real-time repetitive digital calculations. With the growth of the IoT market, more sensors are being deployed, and all the collected data needs efficient real-time processing. Increasingly clear signs indicate that data processing needs to occur directly on IoT devices rather than being sent to the cloud for processing.
Another trend concerning IoT devices is the increasing use of AI-based algorithms for localized data processing. AI algorithms based on neural network models require a high level of parallel capability to execute effectively. Parallel computing capability is a key advantage of DSP over general-purpose Central Processing Units (CPUs). To meet this demand, modern DSP architectures tend to utilize wide vector and Single Instruction Multiple Data (SIMD) capabilities.
In short, powerful DSP-based solutions can simultaneously meet the high-performance computing and low-power requirements of modern IoT devices.
Why DSP Matches Well with RTOS?
Just as DSP is a dedicated processor, RTOS is also a specialized operating system. DSP is dedicated to processing data from the real world extremely quickly and reliably, while RTOS is focused on reliably meeting specific timing requirements regarding response/reaction times. DSPs are more compact compared to general CPUs, and RTOS is similarly compact compared to conventional operating systems. These characteristics perfectly align with the needs of IoT devices, making DSP and RTOS an ideal choice for IoT applications.
Historically, embedded devices typically utilized a dedicated, usually 8-bit or 16-bit microcontroller that could operate without RTOS. However, today’s IoT devices are more complex and require a 32-bit CPU combined with DSP with RTOS to manage control functions and run complex signal processing.
But the question is, can the new generation of DSP simultaneously handle both signal processing and control functions for IoT devices? The answer is yes. A hybrid DSP architecture that can provide DSP-oriented and controller-oriented functionalities is rapidly being adopted by IoT and other embedded devices. This hybrid DSP features support for Very Long Instruction Word (VLIW) architecture implementation, SIMD operations, single-precision floating-point operations, compact code size, full RTOS, ultra-fast context switching, dynamic branch prediction, etc., eliminating the need for additional processors to run RTOS on the device.
DSP-Oriented RTOS
DSP-based RTOS is designed to fully leverage the high-performance characteristics of DSP. It is a preemptive, priority-based multitasking operating system that provides very low interrupt latency. Such RTOS comes with drivers, application programming interfaces (APIs), and chip support libraries (CSLs) tailored for DSP functionalities. All on-chip peripherals can be controlled, such as cache, Direct Memory Access (DMA), timers, interrupt units, etc. Therefore, IoT application developers can easily configure RTOS to efficiently handle resource requests and manage the system.
IoT-Oriented RTOS: RT-Thread
RT-Thread is an open-source RTOS optimized for IoT devices, with extremely low resource consumption, high reliability, and strong scalability. RT-Thread is widely supported by the rich middleware, hardware, and software ecosystem required by IoT devices.
RT-Thread supports all mainstream compilation tools such as GCC, Keil, and IAR, as well as various standard interfaces including POSIX, CMSIS, C++ application environments, and Micropython, Javascript, etc.
RT-Thread also provides robust support for all mainstream CPU and DSP architectures. Through RTOS message-passing, thread inter-communication, synchronization, and signaling can be consistently and efficiently processed.
Currently, RT-Thread has two versions. One is the standard version for resource-rich IoT devices, while the other is the Nano version for resource-constrained systems.
The Perfect Combination of DSP and RT-Thread
Some DSP architectures (such as CEVA DSP) are natively designed to support RTOS functionalities and ultra-fast context switching. Therefore, IoT devices implemented with CEVA DSP and RT-Thread RTOS can handle multiple communication tasks between different resources without interrupting RTOS. For example, the Multi-Core Communication Interface (MCCI) mechanism supports command communication and message passing between cores. Communication between cores is achieved by using AXI to directly access dedicated command registers from ports. DSP has dedicated controls and commands that can track the communication status through MCCI.

Multi-Core Communication Interface Architecture. (Source: CEVA)
Messaging between cores is executed using dedicated 32-bit MCCI_NUM command registers. The 32-bit COM_REGx registers are written by external cores through AXI from ports, and cores can only read them. For a 128-bit AXI bus, the command-generating core can simultaneously write to up to four registers, while for a 256-bit AXI bus, that number increases to eight.
When the command-generating core outputs commands to COM_REGx, the addressing register will be updated, and the relevant status bits in the COM_STS register will also be updated. Additionally, an interrupt (MES_INT) will be acknowledged to notify the receiving core.
When the receiving core reads one of the COM_REGx registers, it will send a read indication signal back to the initiator. The read indication signal is sent by the receiving core using a dedicated RD_IND (Read Indication) MCCI_NUM bit bus interface. Each bit of the RD_IND bus represents a read operation from one of the COM_REGx registers. Using the IO interface, the receiving core can read only one COM_REGx register at a time. This not only simplifies synchronization between different cores but also makes synchronization between different tasks within the same core easier.
———— END ————
● Column: “Embedded Tools”
● Column: “Embedded Development”
● Column: “Keil Tutorial”
● Selected Tutorials in Embedded Column
Follow the public account reply “Join Group” to join the technical discussion group according to the rules, reply “1024” to see more content.


Click “Read Original” for more sharing.