Communication Interface Design of DSP/ARM Dual-core System

Publisher:数据舞者Latest update time:2009-12-21 Source: 单片机与嵌入式系统应用Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The core of embedded systems is embedded microprocessors and embedded operating systems. The hardware core of early embedded systems was various types of 8-bit and 16-bit single-chip microcomputers; in recent years, 32-bit processors have been widely used for their high performance and low price. In recent years, another type of data-intensive processing chip, DSP, has emerged. Due to its special structure, specialized hardware multiplier and special instructions, DSP can quickly implement various digital signal processing and meet various high real-time requirements. With the increasing complexity of modern embedded systems, operating systems have become an indispensable part of embedded systems. Free embedded operating systems, such as Linux, have developed rapidly with their continuous improvement. Linux is a free, powerful, reliable, scalable and extensible operating system. Linux implements many modern operating system theories and supports complete hardware drivers, network communication protocols and multi-processor architectures. The disclosure of its source code is more conducive to the embedded application of operating systems.

Based on the above analysis, the author developed a dual-core embedded system based on ARM and DSP chips. The system makes full use of the respective characteristics of ARM and DSP. It can use ARM and DSP chips for collaborative development, or use ARM or DSP for independent development. Linux is selected as the operating system to give full play to the system's performance.

1 Overall design of the system

Due to the strong control performance of ARM chips, ARM is mainly used for control and a small amount of data processing in embedded systems. Therefore, on the one hand, the CPU is required to have low power consumption and sufficient clock frequency to run the operating system to meet the requirements of portability; on the other hand, it is also required to have a sufficient variety of interfaces to facilitate performance expansion. Based on the above considerations, HY7202 is selected as the CPU in the development platform.

As the data operation part, DSP can give full play to its unique advantages in digital signal processing. TI's C54xx series 16-bit fixed-point DSP is widely used in various communications and portable applications with its high cost performance. Considering the processing requirements of large data throughput applications such as digital video and digital images, TI's TMS320C5416 chip is selected. Its clock frequency can reach up to 206 MHz. The overall system block diagram is shown in Figure 1.

The structure of the system software platform is shown in Figure 2. The software platform is divided into the ARM part and the DSP part, as well as the interface software design part between ARM and DSP. The ARM part uses the ARM Linux Version 2.4.18 of Hynix's PATCH as the operating system, and on this basis, the Linux standard libraries GLIBC, LIBJPG, LIBPNG, IMLIB, LIBWWW, LIBFLASH and Chinese character library are transplanted. The graphical interface uses Microwindows 0.9 and its control library FLNX to provide an embedded graphical interface platform. The system platform has powerful network communication functions. Through the platform WEBSERVER, FTP, TELNET, INETD and other network tools and applications, it can easily develop Internet-based network terminals, remote control, remote data acquisition, and remote data processing products. At the application layer, the system platform integrates window management programs, a full Chinese network browser (supporting HTML and XML), a Flash player (supporting Flash4, Flash5, and Flash6), a text editor, games, etc. for PDA development, set-top box Internet access solutions, and a virtual oscilloscope that can be used for embedded data acquisition and processing.

The DSP part provides a complete HPI driver (DSP part) and communication protocol, adds corresponding data processing control algorithm program, and uses HPI parallel interface to communicate with host ARM for data exchange, which can be used in various real-time processing and control fields.

In addition, DSP and ARM can be used as independent systems, and they both have complete subsystem software. The core of the connection between subsystems is the HPI interface of the DSP device itself.

2 Communication interface design between ARM and DSP

(1) Introduction to DSP HPI port

HPI is a parallel port provided by TMS320C54X and other chips, which is specially used for parallel communication between DSP and external host. HPI interface has standard HPI interface and enhanced HPI interface. For C5416 and C5420 DSP devices, their host interface is enhanced host interface. Standard HPI interface is an 8-bit bus interface, which forms a 16-word by combining 2 8-bit bytes. Enhanced HPI interface is divided into 8-bit and 16-bit. The operation timing of 8-bit enhanced host interface is the same as that of standard HPI interface. The main difference is that the standard type can only access 2 KB dedicated RAM, while the enhanced type can access the entire RAM area of ​​DSP. 16-bit enhanced HPI interface uses 16-bit bus, and the access operation can be completed with just one host operation.

(2) HPI hardware connection

The interface circuit between HMS30C7202 and TMS320C5416 is shown in Figure 3. The system uniformly addresses all control registers, address registers, and data registers of the HPI interface and maps them to the I/O memory space starting from the physical address 0X0C000000 of HMS30C7202.

The address lines RA[3:0] are used to generate the control signals required for HPI access. A0 and A1 determine the register type to be accessed. A2 determines whether the first byte or the second byte is accessed: when A2=0, it indicates that the data written is the first byte; when A2=1, it indicates that the data written is the second byte. In HPI-8, all address lines and control lines are sampled at the falling edge of HDS1 and HDS2, rather than determined by HR/W. Therefore, HR/W indicates whether the current operation is read or write through address line A3, and the data latch signal is generated by nRCS3 and nRW0 after ANDing. KSCAN[2] is set as the PORTA interrupt input pin of HMS30C7202, and the DSP communicates with the Linux underlying HPI driver through interrupts.

3 Design of communication interface driver for ARM and DSP

Linux is a variant of the Unix operating system. The principles and ideas of writing drivers under Linux are completely similar to those of other Unix systems, but they are very different from drivers under DOS or Window environments. Linux drivers can be compiled into the kernel, or dynamically added and uninstalled in the form of modules. This feature of Linux can tailor the kernel according to the target system, making it more suitable for embedded systems.

(1) Basic principles of Linux driver

In Linux, all devices are divided into three types: character devices, block devices, and network devices. All devices are treated as ordinary files, so they can be opened, closed, read, and written to by the same system calls as ordinary files. Each device in the system is represented by a device special file.

In Linux, a device driver is a collection of related functions. It contains device service subroutines and interrupt handlers. Each device service subroutine only handles one device or closely related devices. Its purpose is to accept abstract commands from device-independent software and execute them. When executing a request, the specific operation is based on the interface provided by the controller driver, and the interrupt mechanism is used to call the interrupt service subroutine to cooperate with the device to complete the request. The device program uses the structure file_operations to connect to the file system. Driver loading under Linux is shown in Figure 4.

(2) HPI driver

The HPI interface can be used in I/O port mode or I/O access mode. The system platform uses I/O access mode to map the HPI access control register, data register, and address register to the space starting at the physical address of the memory 0X0C000000, and operate the HPI through the memory access instruction. The specific physical address of HPI is defined as follows:


#defineHPI_BASE0X0C000000 //HPI base address
#define HPD_READ_LOWHPI_BASE+0X0012
//Read the first byte of the data register
#define
HPA_WRITE_HIGHHPI_BASE+0X000C
//Write the second byte of the address register

In Linux, similar to Windows, programs cannot directly access physical addresses. Device drivers are part of the kernel and run in kernel mode like other code in the kernel. If the driver fails, the system will be seriously damaged, so the physical address needs to be mapped to the kernel space. In Linux, this is achieved through virtul_address=(u32)ioremap (HPI_BASE, HPI_LENGTH). The main structure of the driver is as follows:


struct file_operations hpi_fops={
owner:THIS_MODULE,
read: hpi_read,
write: hpi_write,
poll : hpi_poll,
open: hpi_open,
release: hpi_release,
};

The HPI communication protocol uses a frame structure. Since the enhanced HPI interface allows access to all RAM spaces inside the DSP, the system communication allocates 2 K words (16 bits) inside the DSP as a frame buffer, with 1 K words for reading and writing, and the protocol uses a one-bit sliding window protocol. The frame format is listed in Table 1.

Conclusion

This paper introduces the hardware platform of dual-core embedded system composed of ARM and DSP dual CPU, and the method of using open source Linux as the operating system in embedded system, gives the overall block diagram of system design, and introduces the design of ARM and DSP communication interface in detail. This design method can be applied to the design of most modern embedded systems and has certain practical value.

Keywords:ARM Reference address:Communication Interface Design of DSP/ARM Dual-core System

Previous article:Method of Implementing FlexRay Bus on Embedded DSP
Next article:Converged processors provide core platform for smart grid

Recommended ReadingLatest update time:2024-11-16 18:01

Design of serial communication system based on touch screen and DSP
  In modern industrial control, the most commonly used human-machine interface is still a combination of keyboard and LCD. There are still some problems in replacing the previous human-machine interface with a touch screen. In practical applications, touch screens are generally designed for programmable controllers
[Embedded]
Design of serial communication system based on touch screen and DSP
Detailed explanation of the CPU cluster in Arm TCS23
Recently, Arm announced the launch of the 2023 Total Compute Solution (TCS23). TCS23 provides a complete set of the latest IPs designed and optimized for specific workloads, including the latest CPU IP Cortex-X4, Cortex-A720 and Cortex-A520, the latest GPU Immortalis-G720, Mali-G720 and Mali-G620, as well as importa
[Semiconductor design/manufacturing]
Detailed explanation of the CPU cluster in Arm TCS23
Mixed programming of C language and assembly language in ADS environment in ARM and examples
In slightly larger-scale embedded programming, most of the code is written in C, mainly because C language has strong structure, is easy for people to understand, and has a large number of library support. However, for hardware operations, assembly language is still used in many places, such as the setting of CPU statu
[Microcontroller]
Application of ARM-based embedded system in robot control system
1 Introduction With the development of science and technology, robots will have broad application prospects in the fields of space exploration, disaster relief and explosion prevention, and ocean development. Therefore, their development is becoming the focus of attention of researchers at home and abroad .
[Microcontroller]
Application of ARM-based embedded system in robot control system
Design of an Online Reconfigurable Digital Image Parallel Processing System Based on Multiple DSPs
  With the rapid development of multimedia image processing applications, embedded digital image processing systems with small size, light weight, flexible structure and strong processing capability are increasingly in demand in industry, medicine and other fields. High real-time performance, complex calculations
[Embedded]
Design of an Online Reconfigurable Digital Image Parallel Processing System Based on Multiple DSPs
The difference between arm 2440 and 6410
      I first sorted out and collected the differences between 6410 and the most commonly used learning version 2440 on the Internet:   1. The main frequency is different. 2440 is 400M. 6410 is 533/667M; 2. The processor versions are different: 2440 is ARM920T core, 6410 is ARM1176ZJF core; 3.6410 is much better than
[Microcontroller]
Transplantation of Boa server on ARM+Linux
1. Introduction to Boa Server Boa is a very small web server, with an executable code of only about 60KB. As a single-task web server, Boa can only complete user requests one by one, and will not fork a new process to handle concurrent connection requests. However, Boa supports CGI and can fork a process for CGI pro
[Microcontroller]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号