Communication interface design of ARM/DSP dual-core system

Publisher:AngelicWhisperLatest update time:2006-11-09 Source: 互联网Keywords:embedded Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction


  The core of the embedded system is the embedded microprocessor and embedded operating system. The hardware core of early embedded systems were various types of 8-bit and 16-bit microcontrollers; in recent years, 32-bit processors have been widely used due to 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 multipliers and special instructions, DSP can quickly implement various digital signal processing and meet various high real-time requirements. As modern embedded systems become more and more complex, 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 embedded operating system applications.

  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 not only use ARM and DSP chips for collaborative development, but also use ARM or DSP for independent development. Linux was chosen as the operating system to fully utilize the system's performance.

1 Overall design of the system

  Due to the strong control performance of the ARM chip, ARM is mainly used for control and a small amount of data processing in embedded systems. In this way, 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 sufficient types of interfaces to facilitate performance expansion. Based on the above considerations, HY7202 is selected as the CPU in the development platform.

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

    
              Figure 1 The overall hardware structure block diagram of the system

   The system software platform structure 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 of the ARM and DSP. The ARM part uses ARM Linux Version 2.4.18 of Hynix Company PATCH as the operating system, and transplants the Linux standard libraries GLIBC, LIBJPG, LIBPNG, IMLIB, LIBWWW, LIBFLASH and Chinese character libraries on this basis. 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, Internet-based network terminals, remote control, remote data collection, and remote data processing products can be easily developed. On the application layer, the system platform integrates window management programs, full-Chinese cultural web browsers (supports HTML, XML), Flash players (supports Flash4, Flash5, Flash6), text editors, games, etc. for PDA development, set-top boxes Internet solutions, as well as virtual oscilloscopes that can be used for embedded data collection and processing.

     
               Figure 2 The overall structure of the system software.

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

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

2 Communication interface design of ARM and DSP

(1) Introduction to HPI port of DSP

  HPI is a parallel port provided by TMS320C54X and other chips, which is specially used for parallel communication between DSP and external host. The HPI interface includes standard HPI interface and enhanced HPI interface. For C5416 and C5420DSP devices, their host interface is the enhanced host interface. The standard HPI interface is an 8-bit bus interface that combines 2 8-bit bytes to form a 16-bit word. The enhanced HPI interface is divided into 8-bit and 16-bit. The operation timing of the 8-bit enhanced host interface is the same as that of the standard HPI interface. The main difference is that the standard type can only access 2 KB of dedicated RAM, while the enhanced type can access the entire RAM area of ​​the DSP. The 16-bit enhanced HPI interface uses a 16-bit bus, and only one host operation can complete the access operation.

(2) HPI hardware connection

  HMS30C7202 and TMS320C5416 interface circuit 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.

      
              Figure 3 Bidirectional communication between DSP and host.

  Use the address line RA\[3:0\] to generate the control signals required for HPI access. A0 and A1 determine the access register type. A2 determines whether the first byte or the second byte is accessed: when A2=0, it means that the data written is the first byte; when A2=1, it means the data written is the second byte . In HPI-8, all address lines and control lines are sampled on the falling edges 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 It is generated by the phase AND of nRCS3 and nRW0. KSCAN[2] is set to the PORTA interrupt input pin of HMS30C7202, and the DSP communicates with the Linux underlying HPI driver through interrupts.

3 Communication interface driver design of 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 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 reduce the kernel according to the target system, making it more suitable for embedded systems.

(1) Basic principles of Linux drivers.

  In Linux, all devices are divided into three types: character devices, block devices and network devices. All devices are regarded as ordinary files, so they can be opened, closed, etc. by using the same system calls that manipulate ordinary files. Read and write devices. 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 uses the interrupt mechanism to call the interrupt service subroutine to cooperate with the device to complete the request. The device program uses the structure file_operations to associate with the file system. Driver loading under Linux is shown in Figure 4.
     
                Figure 4 Schematic diagram of connecting the module to the kernel

(2) HPI driver

  The HPI interface can be used in I/O port mode or I/O access mode. The system platform uses the I/O access method to map the HPI access control register, data register, and address register to the space starting from the memory physical address 0X0C000000, and operate the HPI through memory access instructions. 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

  under Linux, similar to Windows. Programs cannot directly access physical addresses. The device driver is part of the kernel. It runs in kernel mode like other codes in the kernel. If the driver makes an error, it will cause serious damage to the system, so the physical address needs to be mapped to the kernel space. It is implemented under Linux 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 adopts a frame structure, because the enhanced HPI interface allows To access all spaces of the DSP internal RAM, system communication allocates 2 K words (16 bits) inside the DSP as a frame buffer, with 1 K words each for reading and writing. The protocol adopts a one-bit sliding window protocol. The frame format is listed in Table 1.
     

Conclusion

  This article introduces the hardware platform of a dual-core embedded system using ARM and DSP dual CPUs, as well as the method of using Linux with open source code as the operating system in the embedded system. It provides an overall block diagram of the system design and introduces in detail the ARM and Design of DSP communication interface. This design method can be applied to the design of most modern embedded systems and has certain practical value.

                  References
1 http://www.kernel.org
2 www.linuxdevices.com
3 http://kernelnewbies.org/documents/kdoc
4 Michacl K.Johnson Erik W.Troan. The authoritative guide to LINUX programming. Long Huaqiao, Hu Yi Translated by Yi. Beijing: China Electric Power Press, 2001
5 Xu Sheng, Hu Jianling. Digital signal processor development practice. Shanghai: Shanghai Jiao Tong University Press, 2003
6 Hu Jianling, Xu Sheng. Application and design of digital signal processing systems. Shanghai: Shanghai Jiao Tong University Press, 2003
Keywords:embedded Reference address:Communication interface design of ARM/DSP dual-core system

Previous article:Overall design of RS485 serial communication interface circuit
Next article:Design of embedded serial communication module of μC/OS-II

Recommended ReadingLatest update time:2024-11-16 16:44

qt-embedded-linux-opensource-src-4.5.3 ported to s3c6410
First, you need a configured environment. The compilation environment used in this article is as follows: Host system: Ubuntu 9.10 Host compiler: gcc version 4.4.1 Cross compiler: arm-linux-gcc-4.0.1 Software resources: qt-embedded-linux-opensource-src-4.5.3.tar.gz qt-x11-opensource-src-4.5.1.tar.gz
[Microcontroller]
Lab Chip: Carbon nanotube technology brings medical diagnosis into a new era
Oregon State University researchers have used carbon "nanotubes" to greatly increase the speed of biosensors, a technology that could one day allow doctors to complete routine laboratory tests in minutes, cutting costs while also shortening the time it takes to diagnose and treat. The newly discovered carbon "n
[Medical Electronics]
Lab Chip: Carbon nanotube technology brings medical diagnosis into a new era
Latest Industrial Control 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号