Using CPLD and Flash to implement FPGA configuration

Publisher:TranquilMindLatest update time:2010-08-02 Source: 嵌入式公社Keywords:CPLD  FPGA  Flash  RAM  EDA  VHDL Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Electronic Design Automation (EDA) refers to the process of electronic product automation design that uses computers as working platforms, EDA software as development environment, hardware description language as design language, programmable logic devices (PLD) as experimental carriers (including CPLD, FPGA, EPLD, etc.), and integrated circuit chips as target devices. This process has been widely used in the design of electronic circuits and systems and product development, and has gradually replaced the traditional manual hardware circuit design method. The designed system has the advantages of small size, light weight, low power consumption, fast speed, low price, high reliability, and short design cycle. A fully functional EDA design software plus a programmable logic chip with ordinary functions can form an electronic system that previously required hundreds of integrated circuits.

Commonly used programmable logic devices include CPLD (Complex Programmable Logic Device) and FPGA (Field Programmable Gate Array). Commonly used EDA software includes hardware description languages ​​such as VHDL, Verilog HDL, and ABEL. Among them, VHDL, as the IEEE's industrial standard hardware description language, is supported by many EDA tool manufacturers and has become the de facto universal hardware description language in the field of electronic engineering.

The physical implementation of the programmable part of Xilinx and Ahera's FPGA is RAM. Its biggest advantage is that it can be repeatedly programmed, but its disadvantage is volatility. Therefore, after each power-on, the processor needs to download the user-designed FPGA configuration file from the external memory to the FPGA. There are three ways to download and update the FPGA configuration file from the external memory:

(1) JTAG port download method

Put the configuration file in a host computer, and connect the host computer to the JTAG port hardware on the board through a dedicated line. In this way, each download requires hardware operation, so it is only suitable for the development and debugging stage, and cannot be used when the device is working on site.

(2) Off-chip serial PROM download method

Place one or more serial PROMs (determined by the capacity of the FPGA) around each FPGA. When the system is powered on, the FPGA configuration file is automatically downloaded from the PROM to the FPGA. This method is also the method that companies such as Xilinx and A1tera focus on, and is suitable for relatively stable systems. However, with the increase in the density of FPGA chips, serial PROMs can no longer adapt to the configuration of large-capacity, high-density FPGAs. The addressing method required by large-capacity parallel PROMs cannot be directly interfaced with the FPGA. When the FPGA configuration file in the system needs to be upgraded, the chassis must be opened, and the configuration file in the PROM must be updated first through the JTAG port, and then the system must be restarted to download the updated configuration file from the PROM to the FPGA. Only in this way can the FPGA configuration file be updated once.

Both of the above solutions have the disadvantage that hardware operations must be performed (opening the chassis and using the host through the JTAG port), and professional software must be installed on the host to complete the update of the FPGA configuration file.

(3) Processor controls Flash download mode

Based on the manuals of Xilinx and Altra and previous work experience, this paper proposes and completes a new way to download and update FPGA configuration files. This method is suitable for systems that support network communication. Every time the system starts, the processor reads the FPGA configuration file from the Flash and downloads it to the FPGA. That is, when the FPGA configuration file needs to be upgraded, the configuration file is sent to the processor through the network, and the processor updates the Flash in the system. When the Flash content is updated, the processor controls the automatic download of the configuration file to the FPGA. In this way, without any hardware actions and professional software, only regular software operations are required to update the FPGA configuration file. However, since Flash is a parallel data line, a CPLD is required to convert the data read from the Flash into serial data and output it to the FPGA. [page]

1 FPGA download configuration mode

There are five download modes for FPGA configuration files: master serial mode (masterserial), slave serial mode (slave serial), master parallel mode (master selectMAP), slave parallel mode (slave selectMAP) and JTAG mode. Among them, JTAG mode is used in the development and debugging stage. In order to facilitate debugging in the development and design stage, this core router design directly makes the JTAG port on the signal processing board.

The biggest difference between the master and slave modes is that the download synchronization clock (CCLK) of the master mode is provided by the FPGA; the download synchronization clock (CCLK) of the slave mode is provided by an external clock source or an external control signal. The master mode has much stricter requirements on download timing than the slave mode. Therefore, from the perspective of the processor's easy control of the download process, it is more appropriate to choose to use the slave serial mode or the slave parallel mode. This design uses the slave serial mode for FPGA configuration. The slave serial mode pin description is shown in Table 1.

Slave Serial Mode Pin Description

The slave configuration timing diagram is shown in Figure 1. TPROGRAM is the reset time of the configuration logic. For the Xilinx VIRTEXE and VIRTEX2 series, the minimum should be greater than 300ns. TPL is the reset delay time, indicating the continuation of the configuration logic reset. For the VIRTEXE series, when the reset signal PROG becomes high, INIT immediately becomes high, and the configuration logic can receive the configuration data stream; for the VIRTEX2 series, TPL has a minimum delay of 500ns. TICCK is the output delay of the configuration clock CCLK.

Slave Serial Configuration Timing Diagram

When PROG is valid (resetting the configuration logic), the FPGA will set INIT and DONE low; when PROG becomes high, INIT will delay for a period of time to indicate the continuation of the reset state. Continuing to set INIT low can delay the configuration. When the FPGA is receiving configuration data, INIT becomes low, indicating that the CRC check is wrong. When all data is configured, if the configuration is correct, DONE will become high. After that, the FPGA starts the startup sequence, and continuing to set DONE low can delay the startup. [page]

2 Specific design

The National 863 Project High-Performance IPv6 Core Router undertaken by the National Digital Switching System Engineering Technology Research Center uses an Intel E28F128J3A150 16-bit Flash as BootFlash to power on the PowerPC2860 (MPC860) processor to download and update the configuration. Its extra storage space can fully store the configuration files required by the FPGA. After power-on reset and system startup, the processor cooperates with a XilinxXC95288XL CPLD to control the FPGA configuration file to be downloaded from the Flash to the FPGA to complete the configuration of the FPGA. The 860 processor supports network functions. When the configuration file needs to be updated, the new configuration file can be sent to the processor through the network, and then the processor updates the Flash in the system. The specific circuit design structure of using the XC95288CPLD to configure the FPGA is shown in Figure 2.

The specific circuit design structure of using XC95288CPLD to configure FPGA

In Figure 2, the main function of the CPLD is to convert the data read from the Flash into serial output and then increment the address. The CCLK signal is generated by the CPU clock. The PROG signal is generated by the address data output by the CPU through the decoding module. The XC95288C PLD logic structure is shown in Figure 3.

C95288C PLD logic structure [page]

The specific implementation of each functional module is introduced below:

(1) Data conversion to serial output function module: A right shift register is used. After the parallel data DIN[0:15] from the 16-bit Flash is loaded into the shift register, it is serially output from DOUT to the FPGA.

(2) Address increment function module: This function is completed by two counters. Since Flash is a 16-bit parallel data port, the function of the first counter is to increase by 1 every 16 bits, and the function of the second counter is to increase the Flash address. When the 16-bit data of the shift register are all output to the FPGA, the output port CNT[0:3] of the first counter is all "1", and the second counter is incremented by 1 through the "AND gate" logic. Intel E28F128J3A150 Flash is 16MB, requiring a total of 25 address lines. Since Flash is 16 bits, ADD[31] is not connected. Therefore, the second counter is connected to the address line ADD[7:30] to complete the increment of the Flash address.

(3) CCLK signal generation module: The clock signal from the CPU outputs the data signal DOUT, and generates CCLK after a half-cycle delay through a "NOT gate" logic. CCLK then sends the data on DOUT to the FPGA. In this way, the timing of reading and writing DOUT data is separated to avoid conflicts.

(4) PROG signal generation module: When the FPGA program needs to be downloaded, the CPU generates an address signal ADD[0:30], which is decoded by the decoder to generate the PROG control signal. This address is set by the user.

The above modules are described in VHDL language. The data conversion to serial output function module is the core part, which can realize the serial output of parallel data.

This article introduces a method for downloading and updating FPGA configuration files using CPLD and Flash in a processor. Compared with the traditional JTAG or PROM serial download configuration method, this method is flexible and convenient for updating configuration files, easy to operate, and suitable for downloading large-capacity FPGAs. This method can update the FPGA configuration program at any time without opening the chassis, which is particularly suitable for system designs that require continuous updates and has a broad application prospect.

Keywords:CPLD  FPGA  Flash  RAM  EDA  VHDL Reference address:Using CPLD and Flash to implement FPGA configuration

Previous article:Serial Communication Design of TMS320LF2407 DSP Controller
Next article:ispPAC30 In-System Programmable Analog Device and Its Application

Recommended ReadingLatest update time:2024-11-16 21:00

FPGA Testability Analysis
Modern technology has put forward higher requirements for system reliability, and FPGA technology has been widely used in electronic systems, so FPGA testability has become very important. The internal signals of FPGAs to be obtained are very limited, and the electrical noise of FPGA packaging and printed circuit board
[Embedded]
FPGA Testability Analysis
Design of CAN bus motion controller based on STM32 and FPGA
    Nowadays, motion control is developing in the direction of high speed, high precision and openness, which puts forward higher requirements for the execution components. In the past, motion controllers were mainly based on single-chip microcomputers or PLCs plus discrete digital circuit designs. Due to the performan
[Microcontroller]
Design of CAN bus motion controller based on STM32 and FPGA
I bought a 128GB phone but only got 112GB. Economic Daily: Mobile phone memory cannot be shortchanged
      Recently, the crosstalk artist Yue Yunpeng complained on social media that "a mobile phone marked with 128GB storage has only 112GB of available space", which made the related topic a hot search on Weibo and sparked heated discussions among netizens.   Yue Yunpeng also asked netizens: "Should I be charged for 11
[Mobile phone portable]
I bought a 128GB phone but only got 112GB. Economic Daily: Mobile phone memory cannot be shortchanged
Tsinghua Unigroup builds DRAM plant to accelerate memory layout, causing concern among Taiwanese manufacturers
On August 27, Tsinghua Unigroup announced that it would invest in a factory dedicated to the manufacture of 12-inch DRAM memory chips. The factory will start construction at the end of this year and is expected to be completed and put into production in 2021. A researcher at the China Institute of Taiwan Studies said
[Mobile phone portable]
Design and development of spectrum analyzer based on FPGA
The spectrum analyzer is one of the most basic and important measuring instruments in the field of microelectronics measurement. It is an important tool for the research, development, production and inspection of various electronic products. The methods and implementation of high-resolution and wide-band digital spe
[Test Measurement]
Design and development of spectrum analyzer based on FPGA
Arm2440 - Detailed explanation of Nand flash boot mode (LED program as an example)
I have been studying arm on and off for 2 months. Now I feel that I understand the boot process of arm in Nand flash mode. Now I come here to record it to express my extremely happy mood. Without further ado, while I still remember the feelings during the learning process, I will go straight to the point. As we all kn
[Microcontroller]
Designing GPS System Using CoolRunner-II CPLD
GPS has appeared in more and more products such as cars, mobile phones, PDAs and even watches. Each GPS supplier has launched dozens of GPS products, making it difficult for consumers to choose. Therefore, the success of a product depends on differentiation and specialization. Xilinx's CoolRunner-II CPLD is an
[Embedded]
Design of TCP/IP on IP Core 8051 Embedded in FPGA
introduction As the chip scale becomes larger and the resources become more abundant, the design complexity of the chip has also greatly increased. In fact, after the chip design is completed, sometimes some controls need to be changed according to the situation, which is often encountered during use. At th
[Microcontroller]
Design of TCP/IP on IP Core 8051 Embedded in FPGA
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号