Design of SOPC Technology Based on DSP

Publisher:SerendipityRoseLatest update time:2011-09-27 Keywords:DSP  SoPC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Combining with the Nios II embedded soft-core processor launched by Altera, a Nios II system SOPC solution with the functions of a conventional DSP processor is proposed; the characteristic of Nios II that it can customize fork instructions is utilized.

Complex multipliers, integer multipliers, floating-point multipliers and other hardware modules are designed and generated through Matlab and DSP Builder or directly with VHDL, and they are customized into corresponding instructions, thereby combining the flexibility of software with the high speed of hardware, and better solving the speed problems, non-reconfigurable hardware structure problems, long development and upgrade cycle and non-portability problems faced by traditional DSP processors.

With the development of microelectronics technology and computer tool software, the design concept and design method of programmable system on chip SOPC has become a trend. In order to solve the speed problems, non-reconfigurable hardware structure problems, long development and upgrade cycle and non-portability problems faced by traditional DSP processors, we applied the Nios II embedded soft-core processor launched by Altera and proposed a Nios II system SOPC solution with the functions of a conventional DSP processor.

Since the editable Nios II core contains many configurable interface module cores, users can use Quartus II and SOPC Builder to build Nios II and its peripheral systems according to design requirements. In addition, users can design various hardware modules for Nios II embedded processors through Matlab and DSP Builder, or directly use hardware description languages ​​such as VHDL, and add Nios II instruction system in the form of instructions, thus becoming an interface device of Nios II system and integrating with the entire embedded system on chip, instead of directly downloading to FPGA to generate a huge hardware system. It is these important features of Nios II that make the design of reconfigurable single-chip DSP processor functional system possible.

1 System Structure

This system is a single-chip DSP reconfigurable system that can realize various functions in digital signal processing. Among them, the establishment of the Nios II soft-core processor mainly plays a role in human-computer interaction and control. After receiving the control signal and data from the Nios II processor, the logic module of the FPGA realizes the corresponding hardware function. The system structure block diagram is shown in Figure 1. In addition to the soft-core processor Nios II, the memory and I/O interface as well as application modules such as FIR digital filter, IIR digital filter and DDS can be embedded in the FPGA as peripherals. In this way, the digital signal processing part of the entire DSP is fully integrated in the FPGA device, and each module is controlled by the Nios II processor. The Nios II processor system has an Avalon bus, which specifies the port connection between the controller and the slave module and the timing of the module-to-module communication. The digital frequency synthesizer DDS is connected to the Nios II processor through the Avalon bus, which can easily complete the control and data transmission.

The FPGA of this system uses Cyclone EPICl2, which has 12 060 logic units (LE) and 2 phase-locked loops (PLLs), provides 6 outputs and hierarchical clock structure and complex clock management circuit design. The ultra-high-speed 10-bit D/A converter 565l is selected to realize the D/A conversion function, and the maximum conversion rate is 150 MHz. Under the control of the Nios II processor, the entire system can realize FIR digital filtering, IIR digital filtering, fast Fourier transform (FFT) algorithm, encoding/decoding, DDS functional module design, and the signal generator composed of it with functions such as digital control frequency modulation, orthogonal carrier modulation and demodulation, and digital control phase modulation.

The selection of each functional module in the system, as well as the output signal modulation mode and frequency, can be freely selected through external buttons. Next, a Nios II system with conventional DSP processor functions is constructed.

2 Nios II Embedded System Design Process

The NiosII embedded processor is a CPU soft core specially optimized for single-chip programmable system (SOPC) design launched by Altera. It is a user-oriented
, flexibly customizable general-purpose RISC (reduced instruction set) embedded CPU. It uses the Avalon bus structure communication interface, with enhanced memory, debugging and software functions, and can be optimized and developed in assembly or C, C++ and other languages; it has a 32-bit instruction set, 32-bit data channel and configurable instruction and data buffers. Different from the characteristics of ordinary embedded CPU systems, its peripherals can be flexibly selected or added or deleted, and user logic can be customized as peripherals, allowing users to customize their own instruction sets. Customized instructions composed of hardware modules can complete complex software processing tasks through hardware algorithm operations, and can also access memory or interface logic outside the Nios II system. Designers can use Nios II plus external Flash, SRAM, etc. to build an embedded processor system on FPGA.

A complete SOPC system based on Nios II is a complex system of hardware and software, so it can be divided into hardware and software during design. The hardware design of Nios II is to customize the appropriate CPU and peripherals, which is completed in SOPC Buider and Quartus II. Here, many features and even instructions of NiosII CPU can be flexibly customized; a large number of IP cores provided by Altera can be used to speed up the development of Ntos II peripherals and improve peripheral performance; third-party IP cores or VHDL can also be used to customize peripherals. After completing the hardware development of Nios II, SOPC Buider can automatically generate a software development kit SDK corresponding to the customized Nios II CPU and peripheral system, memory, peripheral address mapping, etc.; based on the generated SDK, enter the software development process. Assembly or C language, or even C++ language can be used for embedded program design, and GNU tools or other third-party tools can be used to compile, link and debug programs.

3 System Hardware Design

The hardware system of the system consists of three parts: FPGA part, memory part and peripheral components part. The FPGA part is built in the FPGA, and it is this part that needs to be designed in SOPC Builder. It includes a NiosII CPU core, an internal clock, an Avalon bus controller, a JTAG_UART communication module for connecting the download and debugging program of the Nios II core, a DDS interface module and a DDS module, a FIR, IIR digital filter interface module and a functional module, a codec module and an interface module, and a Flash memory module. Its design is different from general embedded development. The corresponding peripheral module core can be added outside the Nios II core (but still in the same FPGA chip), and connected to the Nios II through the on-chip Avalon bus. In order to make the Nios II system with DSP processor function work normally, some control keys are connected to the periphery of the FPGA to schedule the application of each module.

3.1 Building a Nios II Embedded Processor System

First, use Quartus II to build a project, and select the target device as Cyclone EPIC12;
then use SOPC Bider to create a Nios II component model, generate a hardware description file, lock the pins, perform synthesis and adaptation, and generate a Nios II hardware system download file; then build a Nios II embedded system, and add the required components (such as Nios II CPU core, timer Timer, JTAG_UART, Avalon tri-state bus bridge, key input I/O port and Flash, etc.) from the SOPC Buider component column. In addition, in order to realize the read and write access of the NiosII processor to the EPCS Flash memory, an EPCS Serial F1ash Controller component must be added. Through this controller, the SOF file used for FPGA configuration and the software running on the CPU are stored in the EPCS device together, so as to greatly simplify the hardware system composition structure. In order to ensure that the address arrangement of all components is legal, the addresses of each component must be automatically allocated; finally, the whole process compilation (i.e. analysis, synthesis, adaptation and output file assembly) is carried out to complete the design of the Nios II hardware system.

After the Nios II hardware system design is completed, the configuration file is downloaded to the specified FPGA. Through the SOPC Builder software window, you can enter the Nios II IDE software development environment for software design.

3.2 Establishment of DSP processor functional system

Using DSP Bider to design DSP modules on FPGA can achieve high-speed DSP processing. However, in practical applications, in addition to requiring high DSP speed, the algorithms processed by DSP are often complex. If DSP Bider is used alone to implement pure hardware DSP modules, it will consume too many hardware resources, so sometimes it is impossible to complete many models with complex algorithms. Nios II is an embedded microprocessor soft core built on FPGA, and one of its important features is that it has custom instructions.

In DSP algorithms, some operations (such as complex multipliers, integer multipliers, floating-point multipliers, etc.) will appear repeatedly, but there are no relevant instructions specifically used for complex multiplication and floating-point multiplication in general-purpose CPUs. In system design, use MATLAB, DSP Buider or VHDL to design and generate hardware modules such as complex multipliers, integer multipliers, and floating-point multipliers. After making some corrections to the above files in the Quartus II environment, customize them to corresponding instructions in the SOPC Buider window, and set or modify the clock cycle for executing the instruction. When performing DSP algorithm operations, these custom instructions can be used for embedded programming through assembly or C language, or even C++ language.

According to the algorithm of complex number operation, assuming there are two complex numbers a+bj and c+dj, the multiplication can be expressed as:

Figure 2 is a complex multiplier model designed using MATLAB and DSP Builder. It implements a 16-bit complex multiplication, where both the imaginary and real parts are 16 bits, and a 32-bit value can be used to represent the complex number. In the design, NiosII is 32-bit data, which can hold exactly two complex numbers.

To set up this complex multiplier hardware module to the corresponding instructions, you must also do the following:

① Click the SignalCompiler icon to convert it, select the device (use Cyclone) and Quartus II synthesizer. After conversion, it will generate the PTF file of SOPCBuider.

② After exiting MATLAB, modify the top-level VHDL file of the complex multiplier generated after conversion in the Quartus II environment. Double-click the CPU item in the SOPC Builder window to enter the "Instruction Addition" editing window and set this hardware module to a custom complex multiplication instruction.

After the instruction is generated, you can use Quartus II to edit the C program for testing; after the test is successful, you can use the complex multiplication instruction when you encounter complex multiplication in the DSP algorithm calculation. This method generates instructions from commonly used hardware modules and implements more complex DSP algorithms in FPGA through a design method that coexists software and hardware. It can combine the flexibility of software and the high speed of hardware, and better solve many problems in modern DSP design. However, for the DDS module, it is still solidified in the FPGA in the form of hardware. Amplitude, phase and frequency modulators can be designed using DDS as needed.

In addition, the peripherals of Nios II can be customized arbitrarily. All the peripherals of Nios II system are connected to Nios II CPU through Avalon bus. Avalon bus is an on-chip bus with relatively simple protocol. Nios II exchanges data with the outside world through Avalon bus. In this system, the AvalonSlave peripheral method is adopted to add the customized AvalorL bus component A/D conversion interface module and D/A interface module to control the sampling A/D work and the waveform data output of high-speed D/A; while the customized Avalon bus component DDS module interface and DSP function conversion control interface are used for Nios II CPU to control the DDS module and to control the selection of DSP function through external keyboard.

Conclusion

The entire system is in a single FPGA programming chip except for the A/D, D/A converter and the control selection keyboard. Because NiosII is used as the CPU, it is possible to customize instructions and various interface module components through the Avalon bus, making the entire DSP system flexible and diverse, and it has more and more applications in modern DSP technology.

Keywords:DSP  SoPC Reference address:Design of SOPC Technology Based on DSP

Previous article:Analysis of embedded system technology based on DSP devices
Next article:System implementation of voice collection and echo effect based on DSP

Recommended ReadingLatest update time:2024-11-16 15:27

Design of 3G video helmet based on ARM11 and DSP collaborative video stream processing technology
1. Introduction In order to improve the controllability of on-site operations in high-risk workplaces, this paper adopts bionic principles and high-integration design to realize a 3G video helmet with the same viewing angle as the human eye. This design consists of a video helmet and a waist-span data processing termi
[Power Management]
Design of 3G video helmet based on ARM11 and DSP collaborative video stream processing technology
CEVA Helps Customers Efficiently Implement Sensor Fusion with SensPro Sensor Hub DSP
It is well known that sensors work best when used together. This is especially true for simultaneous localization and mapping (SLAM). SLAM plays an important role in the AR/VR space, adjusting the scene based on the user's posture and avoiding collisions during use in applications such as drones or robots. The SLAM ma
[Mobile phone portable]
CEVA Helps Customers Efficiently Implement Sensor Fusion with SensPro Sensor Hub DSP
Parallel Active Power Filter Controller Based on DSP ARM
Introduction: For the three-phase system, an APF control algorithm based on DC side capacitor voltage control is adopted. Starting from the perspective of instantaneous active and reactive power transmission in the system, the active power input to the APF from the power grid is adjusted as the goal, and the input cur
[Microcontroller]
Parallel Active Power Filter Controller Based on DSP ARM
A DSP-based method for optimizing XC166 single-chip program independently of hardware technology
   The instruction pipeline of XC166 microcontroller has inevitable blocking phenomenon, and the same is true for MAC unit instructions. Although dedicated modules have been used to reduce blocking during hardware design, some blocking is inevitable. From the perspective of program optimization, the blocking phenomeno
[Microcontroller]
A DSP-based method for optimizing XC166 single-chip program independently of hardware technology
DSP Programming Skills - Unveiling the Mystery of the Compiler: Basic Linker Options
  When we program DSP , I believe no one will put all the codes in the same source file: there are hundreds or thousands of lines of initialization code for various registers , plus the code we write ourselves, imagine if there are 10,000 lines in a .c file, how to manage and debug? So it should be divided accordi
[Embedded]
DSP Programming Skills - Unveiling the Mystery of the Compiler: Basic Linker Options
Design of software architecture for multi-signal parallel processing based on DSP/BIOS
  With the development of information technology and chip technology, DSP technology has been widely used in aviation, communication, medical and consumer electronic devices. With the continuous increase of main frequency and multi-core parallel work, the computing power of DSP chips has increased rapidly. It has beco
[Embedded]
Design of software architecture for multi-signal parallel processing based on DSP/BIOS
Real-time signal simulator completed by DSP
Preface   In the design of digital signal processing systems such as communications and radar, signal simulators play a vital role. The simulator is used to simulate various input signals of the signal processing system during actual work, thereby facilitating system debugging. Existing instruments can be used to si
[Embedded]
Design of ECG monitoring module based on DSP
    Abstract: The TMS320C2XX series fixed-point digital signal processor (DSP) of Texas Instruments (TI) has powerful real-time processing capabilities and highly integrated on-chip hardware resources. It is flexible and convenient to use and has been widely used in the field of digital signal processing. The applica
[Embedded]
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号