DSP with Embedded RTOS: The Best Choice for IoT

The rapid development of the Internet of Things (IoT) has exceeded the imagination of almost everyone, 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 (DSP) requires higher computational power and lower power consumption. This article argues 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 certain technologies has increased significantly. Digital Signal Processing (DSP) is one such technology, which can take the form of chips or as IP cores in System on Chips (SoCs). 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. Given the inherent nature of many IoT devices, real-time operating systems (RTOS) are typically used.

DSP with Embedded RTOS: The Best Choice for IoT

Ori Leibovich, Senior Manager of Embedded Development at CEVA

Evolution of DSP Technology

DSP is used to convert and process analog signals from the real world, and this processing is accomplished through complex signal processing algorithms. As a technology that emerged in the 1980s, DSP has made significant advancements in hardware capabilities, software development tools, and infrastructure. Early algorithms were programmed onto DSPs using assembly language. As the DSP market expanded and algorithms became increasingly complex, the architecture has 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 accommodate the entire set of programs required for executing 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 almost covers 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, enabling 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. DSPs are designed to analyze and process various signals from the real world, such as audio and video, temperature, pressure, or humidity, involving precise and accurate real-time repetitive digital computations. As the IoT market grows, more sensors are deployed, and all collected data requires 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 currently occurring concerning IoT devices is the increasing use of AI-based algorithms for local data processing. AI algorithms based on neural network models require a high level of parallel capability to execute effectively. The parallel computing capability is a key advantage of DSP over general-purpose Central Processing Units (CPUs). To meet this requirement, modern DSP architectures tend to utilize wide vectors 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 and RTOS are a Good Match?

Just as DSP is a dedicated processor, RTOS is also a specialized operating system. DSP is dedicated to processing real-world data extremely quickly and reliably, while RTOS is focused on reliably meeting specific timing requirements for response/reaction times. DSPs are more compact compared to general CPUs, and RTOS is also more 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 microcontroller, usually 8-bit or 16-bit, which could operate without an RTOS. However, today’s IoT devices are more complex and require a 32-bit CPU combined with a DSP with RTOS to manage control functions and run complex signal processing.

But the question is, can the new generation of DSP handle both signal processing and control functions for IoT devices simultaneously? The answer is yes. A hybrid DSP architecture capable of providing 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 an additional processor to run the 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 a chip support library (CSL) customized for DSP chips. All on-chip peripherals can be controlled, such as caches, Direct Memory Access (DMA), timers, interrupt units, etc. Therefore, IoT application developers can easily configure the 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 a rich ecosystem of middleware, hardware, and software required for IoT devices.

RT-Thread supports all mainstream compilation tools, including GCC, Keil, and IAR, and supports various standard interfaces such as POSIX, CMSIS, C++ application environments, as well as Micropython and Javascript.

RT-Thread also provides robust support for all mainstream CPU and DSP architectures. Through RTOS message passing, inter-thread communication and synchronization, signaling, etc., can be consistently and efficiently handled.

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

DSP with Embedded RTOS: The Best Choice for IoT

Figure 1: Multi-Core Communication Interface Architecture. (Source: CEVA)

Message passing between cores is executed using 32-bit MCCI_NUM dedicated command registers. The 32-bit COM_REGx registers are written by external cores through AXI from the port, and the cores can only read them. For a 128-bit AXI bus, the command-generating core can write to up to four registers simultaneously, while for a 256-bit AXI bus, this number increases to eight.

When the command-generating core outputs a command 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 sends 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 only read 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.

Original link:

https://www.ceva-dsp.com/ourblog/iot-dsp-and-rtos-a-perfect-match/

END

DSP with Embedded RTOS: The Best Choice for IoT

If you love me, please give me a thumbs upDSP with Embedded RTOS: The Best Choice for IoT

Leave a Comment