System and method for updating CYCLONE V program by integrating USB and RS485
By integrating USB and RS485 interfaces, the controller and USB disk read and write circuits are used to update the FPGA program, which solves the problems of cumbersome, high cost and error-prone updates in the prior art, and realizes simple and reliable program updates and Efficient workflow.
Patent Information
- Application Number
- CN202410973450.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-05
AI Technical Summary
When updating the on-site programmable logic gate array (FPGA) program, the existing technology needs to disassemble the shell and handle it cumbersomely. Adding the main control chip MCU has the risk of program running, remote configuration requires network resources, and the hardware cost is high and error-prone.
By integrating USB and RS485 interfaces, using controller read and write circuits and USB disk read and write circuits, binary files are written to the FPGA program memory, and using FPGA chip to communicate with USB disk, the RS485 chip updates binary files in FPGA, with a simple structure. Reliable operation and easy to implement.
It realizes simple and reliable updates of FPGA programs, avoids the risk of increasing the main control chip, reduces hardware costs, improves work efficiency, and reduces the risk of dismantling and damaged equipment.
Smart Images

Figure CN118897684A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electronic control, and in particular to a system and method for updating a CYCLONE V program by integrating USB and RS485. Background Art
[0002] With the continuous development of Field Programmable Gate Array (FPGA), the FPGA needs to be upgraded to meet new requirements and program maintenance and programming during use. Currently, most of them use Joint Test Action Group (JTAG) or active serial configuration mode (AS) interface to fix the program into FLASH. For this kind of product with complete package, it is necessary to disassemble the shell for processing, which is quite cumbersome.
[0003] In order to solve the FPGA program field update technology, there are currently three devices on the market:
[0004] 1) Add a micro control unit (MCU) to control the configuration of the FPGA. The main control chip MCU has a communication interface and a FLASH chip. The FLASH configuration is completed through the communication between the main control chip MCU and the FPGA. This requires adding a main control chip circuit, and it will also occupy the power-on logic and FPGA resources of the main control chip. For industrial occasions that only require FPGA, adding a main control chip MCU has the risk of program failure.
[0005] 2) After power-on, use the server to burn the FPGA online, connect the server computer and the FPGA board. When an update is needed on site, the JTAG and AS programs are downloaded through a remote control computer. This requires additional server costs; at the same time, remote configuration also requires the cooperation of network resources, which is more cumbersome.
[0006] 3) Multi-way selection switch and multi-way FLASH technology. When updating the FPGA program, the FLASH connected to the FPGA is updated through the multi-way selection switch. After the update is completed, the unused FALSH needs to be disconnected and the corresponding updated FLASH needs to be loaded. The multi-way selection switch needs to be switched frequently, which increases the hardware cost and also has the risk of errors. Summary of the invention
[0007] The invention aims to provide a system and method for updating a CYCLONE V program by integrating USB and RS485. FPGA is divided into a soft core space and a hard core space. A binary file is written into a program memory space through a controller read-write circuit and a U disk read-write circuit. A factory image and a user image are stored in EPCQ-FLASH (Intel QuadSerial Flash, referred to as EPCQ-FLASH) through different addresses. When the FPGA is powered on, the program is sequentially run in a synchronous dynamic random access memory SDRAM (Synchronous Dynamic Random Access Memory, referred to as SDRAM) according to different functions. The corresponding binary file is read by communicating with the FPGA chip and the U disk. The RS485 chip updates the binary file in the FPGA. The invention has a simple structure, reliable operation and is easy to implement.
[0008] To achieve the above object, the present invention is implemented through the following technical solutions:
[0009] A system for updating a CYCLONE V program by integrating USB and RS485 comprises a main control board, wherein the main control board comprises a DSP, an FPGA, a JTAG download interface 1, a JTAG download interface 2, a controller read / write circuit, a code switch / keyboard, a U disk read / write circuit, a communication circuit, a FLASH memory 1, a FLASH memory 2, a FLASH memory 3, and an SDRAM memory, wherein the DSP and the FPGA are connected through a port, the DSP is respectively connected to the communication circuit, the code switch / keyboard, the FLASH memory 1, the FLASH memory 2, and the JTAG download interface 1 through the port, the FPGA is respectively connected to the U disk read / write circuit, the controller read / write circuit, the SDRAM memory, the FLASH memory 3, and the JTAG download interface 2, the U disk read / write circuit comprises a USB chip and a U disk, and the USB chip and the U disk are connected through the port.
[0010] The controller read-write circuit includes RS485 chip 2, which is connected to the host computer through a port. The controller read-write circuit is used for RS485 update of FPGA program. The communication circuit is an RS485 communication circuit, including RS485 chip 1 and the host computer, which is connected to the host computer through a port.
[0011] DSP uses ADSP24188 chip, FPGA uses 5CEA7F23 chip, USB chip uses CH376T chip, SDRAM memory uses IS42S16400J chip, FLASH memory 1 uses PB85RS2MC chip, FLASH memory 2 uses M25P16 chip, FLASH memory 3 uses EPCQ128A chip, which is used to store and update FPGA program, JTAG download interface 1 is used to download and update DSP program, JTAG download interface 1 is used to download and update DSP program, and JTAG download interface 2 is used to download and update FPGA program.
[0012] It also includes a power supply module, which is used to provide DC power to the main control board.
[0013] The DIP switch / keyboard is provided with switches and DIP numbers for selecting the corresponding communication interface.
[0014] A method for updating a CYCLONE V program by integrating USB and RS485. The FPGA of the CYCLONE V completes program update through a corresponding communication interface by building a factory-imaged hard-core program and a soft-core program. The FLASH memory completes the hard-core space or soft-core space update of the user program by selecting a corresponding address mapping. After the FPGA chip program is compiled, the corresponding download files of the hard-core and the soft-core are converted into BIN binary files, so that the FPGA directly reads and writes the BIN binary files to the FLASH memory. The main control board communicates with the FPGA through the RS485 interface chip, transmits the byte size of the user program and the binary file, and updates the corresponding user program. The steps are as follows:
[0015] S1, FPGA chip reads and writes USB chip data;
[0016] S2. Insert the USB flash drive with the BIN burning file;
[0017] S3, FPGA chip executes the command to open the USB disk;
[0018] S4, the FPGA chip reads the capacity information of the BIN binary file in the USB flash drive, and after comparing it with the capacity of the SDRAM memory, determines the maximum capacity of each read;
[0019] S / 5. FPGA chip erases the hard core or soft core FLASH program space of the user program, because for FLASH chip, updating data requires erasing the original data before writing data, and FLASH cannot write data directly;
[0020] S6, the FPGA chip copies the BIN binary file data of the USB flash drive, and reads the BIN binary file into the SDRAM memory in pages according to the bytes set for each page;
[0021] S7, the FPGA chip writes the mirror area data into the user FLASH program space that needs to be updated in pages;
[0022] S8, the FPGA chip reads and writes the mirror area data and the U disk data to compare, and checks whether the FPGA write and read are consistent. If not, return to step S4 until the write and read are consistent.
[0023] S9, the FPGA chip continues to copy the remaining data information of the BIN binary file in the USB flash drive, and returns to execute steps S6-S8 until all BIN files in the USB flash drive are updated;
[0024] S10, FPGA executes the command to close the USB disk.
[0025] In step S4, the FPGA chip reads the capacity information of the BIN binary file in the U disk, and after comparing it with the capacity of the SDRAM chip IS42S16400J, determines the maximum capacity of each read; due to the BIN file capacity of the U disk, if the FPGA program content is large, the space occupied will be large, but the SDRAM memory space is limited, and the U disk file needs to be copied to the SDRAM memory in batches, and then copied to the FLASH memory. In the middle, the SDRAM memory needs to be transferred and verified at the same time, so the maximum capacity of each read needs to be determined.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. Utilize the existing controller read-write circuit and U disk read-write circuit. In the formal program mode, the controller read-write circuit is used to realize communication with other electrical equipment, and the U disk read-write circuit is used to realize fault recording. In the update program mode, the controller read-write circuit and the U disk read-write circuit can respectively realize the burning of FPGA program. In this way, the controller read-write circuit and the U disk read-write circuit are used in both the formal program mode and the update program mode. Since they are realized separately in time sharing, the functions are realized independently of each other, the structure is simple, and it is easy to realize.
[0028] 2. The FPGA reconfiguration process is to burn the FPGA program into the FLASH chip, which is equivalent to re-updating the FPGA program. There is no need to add a main control chip. The FPGA chip completes the reconfiguration, saving costs.
[0029] 3. Provide two program update methods besides JTAG download, namely controller read-write circuit and U disk read-write circuit. Use the DIP switch to distinguish the update program mode and the formal program mode, and update the hard core space or soft core space of the user program respectively;
[0030] 4. After the control panel shell of the SVG control cabinet is installed, when the user has an update requirement, the traditional operation method is: disassemble the panel shell through the JTAG interface or AS interface, and then insert the downloader. When debugging in the factory, the test program also needs to be updated. Due to the large number of boards, improper disassembly and damage to the equipment are prone to occur during the operation of disassembling the control panel shell, affecting work efficiency. The U disk is connected to the USB chip through the port, and the host computer is connected to the RS485 chip through the port, which improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is the connection topology diagram of each board of the control machine;
[0032] Figure 2 It is the connection topology diagram of the main control board DSP and FPGA circuit;
[0033] Figure 3 It is the topology diagram of the connection between FPGA and USB disk;
[0034] Figure 4 Provide a topology diagram for the connection between FPGA and SDRAM memory;
[0035] Figure 5 This is the address mirror connection diagram of EPCQ-FLASH in FPGA;
[0036] Figure 6 FPGA program update process and formal flow chart for USB and RS485.
[0037] Figure 7 Updated FPGA program flow chart for USB specific operations. DETAILED DESCRIPTION
[0038] The present invention is described in detail below in conjunction with the accompanying drawings, but it should be noted that the implementation of the present invention is not limited to the following embodiments.
[0039] The following examples are implemented on the premise of the technical solution of the present invention, and provide detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to the following examples. The methods used in the following examples are conventional methods unless otherwise specified.
[0040] [Example 1]
[0041] See Figure 1, a system integrating USB and RS485 to update CYCLONE V program, including boards, the boards including backplane P1, power board P2, analog board P3, digital board P4, main control board P5, and optical fiber board P6, the power board P2, analog board P3, digital board P4, main control board P5, and optical fiber board P6 are connected to the backplane P1 through ports, and the backplane P1 is used for communication connection between various boards (analog board P3, digital board P4, main control board P5, and optical fiber board P6); the power board P2 is used for power supply, and is input by 220V AC to generate the power required by various boards; the analog board P3 is used to collect data information such as grid voltage, grid current, load voltage, and load current; the data board P4 is used for input and output of digital switch quantities; the optical fiber board P6 is used for high-voltage power unit drive output and communication.
[0042] See Figure 2 The main control board P5 includes a DSP chip S1, a CYCLONE V FPGA chip S2, an SDRAM memory S14, a FLASH memory S3, a FLASH memory S4, a JTAG download interface S5, a crystal oscillator, a controller read-write circuit, a DIP switch / keyboard S8, and a communication circuit. The DSP chip S1 is connected to the host computer through an RS485 chip S7, which is used to display the status of related devices and FPGA. The FPGA chip S2 is respectively connected to the FLASH memory S13, the SDRAM memory S14, the JTAG download interface S12, the crystal oscillator S11, the U disk read-write circuit, and the controller read-write circuit.
[0043] The FLASH memory S13 is used to store the FPGA program, the SDRAM memory S14 is used to run the soft core system, the JTAG download port S12 is used to update the FPGA program, the crystal oscillator S11 is used to provide the timing reference of the program, the controller read-write circuit S10 is used to update the binary file in the FPGA S2, the U disk read-write circuit is used to update the user program, and the U disk read-write circuit S9 includes a USB chip and a U disk, and the USB chip and the U disk are connected. Figure 3 The FPGA chip 5CEA7F23 is connected to the USB chip CH376T through interrupt signals, chip select signals, clock signals, input signals, and data output signals. The USB chip CH376T and the U disk are connected using power signals, ground signals, differential positive signals, and differential negative signals.
[0044] The controller read-write circuit S10 includes an RS485 chip for connecting to the host computer. The RS485 chip is MAX1487, the USB chip is CH376T, the FLASH memory S13 is used to store engineering images and user images, the FLASH flash memory uses an EPCQ128A chip, and the soft core system is used for program updates and corresponding device control algorithm implementation; the SDRAM memory S14 uses IS42S16400J to implement the FPGA program running system. Figure 4 , the FPGA chip 5CEA7F23 of CYLONE V and the USB chip CH376T are connected through the chip clock signal, clock valid signal, chip select signal, row valid signal, column valid signal, write valid signal, BANK address signal, address bus signal, bidirectional data signal and high and low mask signal, see Table 1.
[0045] See Table 1 for the symbol name description of the main control board
[0046] Logo chip illustrate S1 ADSP24188 Main control DSP chip to implement control algorithm. S2 5CEA7F23 Main control FPGA chip to realize high-speed real-time protection algorithm S3 PB85RS2MC Ferroelectric FLASH memory chip, storage device parameters S4 M25P16 FLASH memory chip, storing DSP program S5 JTAG(PIN14) 14-pin download port, used to download and update DSP program S6 25M DSP clock crystal, frequency can reach 400M through DSP multiplication S7 MAX1487 RS485 chip to realize communication between DSP and host computer S8 Dial and buttons Dial code and button to distinguish DSP or FPGA function mode S9 CH376T USB chip, to enable USB update of FPGA program. S10 MAX1487 RS485 chip, to realize RS485 update of FPGA program. S11 40M FPGA clock crystal, frequency multiplication can reach 160M through FPGA S12 JTAG(PIN10) 10-pin download port, used to download and update FPGA program S13 EPCQ128A FLASH memory chip, storing the FPGA program of this patent S14 IS42S16400J SDRAM memory chip to realize FPGA program running system
[0047] The chip of the main control board P5 includes DSP. The DSP chip is ADSP21488, which is used for data processing. The main control board P5 is connected to the host computer through the communication port; it also includes a power supply module, which is used to provide DC power to the board. The dip switch / keyboard S8 is provided with switches and dip numbers for selecting the corresponding communication interface. The chip pins are shown in Table 2 and Table 3.
[0048] Table 2: U1 (CH376T) pin description
[0049] Pin Definition U2(CH376T) illustrate PIN1(INTN) Interrupt output pin After reading the data from the USB flash drive, an interrupt is generated and provided to the FPGA PIN2(RSTI) Reset input pin Hardware reset, can be used when CH376 is abnormal PIN3(SPIN) Interface Configuration Pins Used in conjunction with hardware reset, the internal state will be reset after pulling up PIN4(TXD) Serial port sending pin FPGA can use serial port commands to control CH376, for backup. PIN5(RXD) Serial port receiving pin FPGA can use serial port commands to control CH376, for backup. PIN6 (SD_DI) SD card data input FPGA can read and write SD card, for backup. PIN7(V3) Regulated power supply pin Internal power supply voltage pin. PIN8(UD+) USB Differential Signaling+ The positive pole of the USB signal differential line is connected to the USB flash drive through the terminal. PIN9(UD-) USB Differential Signaling - The negative pole of the USB signal differential line is connected to the USB flash drive through the terminal. PIN10(GND) Ground terminal Reference level ground terminal. PIN11(XI) Crystal input pin External 12M crystal oscillator PIN12(XO) Crystal oscillator output pin External 12M crystal oscillator PIN13(SCS) USB chip select pin Chip select signal when FPGA reads and writes USB disk. PIN14 (SCK) U disk clock pin Clock signal when FPGA reads and writes USB disk. PIN15(SDI) U disk data input Data input signal when FPGA reads and writes USB flash drive. PIN16(SDO) USB disk data output Data output signal when FPGA reads and writes USB flash drive. PIN17(SD_CS) SD card select pin FPGA can read and write SD card, for backup. PIN18 (SD_DO) SD card data output FPGA can read and write SD card, for backup. PIN19 (SD_CK) SD card clock pin FPGA can read and write SD card, for backup. PIN20(VCC) Power supply pin Chip power supply 3.3V
[0050] Table 3: U2 (ADUM3200), U3 (ADUM3201), U4 (MAX1487) pin description
[0051]
[0052]
[0053] A method for updating the program of INTEL's fifth-generation FPGA chip CYCLONE V by integrating USB and RS485. The CYCLONE V FPGA chip completes program update through a corresponding communication interface by building a factory-imaged hard-core program and a soft-core program. The FLASH flash memory completes the hard-core or soft-core space update of the user program by selecting a corresponding address mapping. After the FPGA chip program is compiled, the corresponding download files of the hard-core and the soft-core are converted into BIN binary files, so that the FPGA chip directly reads and writes the BIN binary files to the FLASH flash memory. The controller communicates with the FPGA chip through an RS485 interface chip, transmits the byte size of the user program and the binary file, and updates the corresponding user program. The steps are as follows:
[0054] Step S1, power on the board. At this time, the board 24V is converted to 3.3V / 2.5V / 1.2V to power the FPGA chip.
[0055] Step S2, the DIP switch / keyboard S8 is turned on, and the USB chip and the U disk enter the initial state of updating.
[0056] Step S3: LED1 is always on, indicating that the USB chip and the USB flash drive have entered the initial state.
[0057] Step S4: Long press the button for 10 seconds to proceed to the next step.
[0058] Step S5, the FPGA chip reads and writes the USB chip data. After the read and write verification is normal, the LED1 light status flashes slowly, indicating that the USB chip communication is normal.
[0059] Step S6, insert the USB flash drive with the BIN burning file and proceed to the next step.
[0060] Step S7: The FPGA chip executes the command to open the USB disk.
[0061] Step S8, the FPGA chip checks the connection status of the USB flash drive. The fast flashing of LED1 indicates that the USB flash drive and the connection status are successful.
[0062] Step S9, the FPGA chip reads the capacity information of the BIN binary file in the USB flash drive, and after comparing it with the capacity of the SDRAM, determines the maximum capacity read each time.
[0063] Step S10: According to the specific conditions of the project, the FPGA chip erases the FLASH space of the hard core or soft core of the user program.
[0064] Step S11, the FPGA chip copies the BIN binary file of the USB flash drive, and reads the file into SDRAM in pages of 65536 bytes per page.
[0065] Step S12: The FPGA chip writes pages to the user FLASH program space that needs to be updated.
[0066] Step S13: The FPGA chip reads and writes the mirror area data, and compares it with the USB flash drive data.
[0067] Step S14, verify whether the write and read are consistent. If abnormal, re-copy the data and re-check the data until it is normal.
[0068] Step S15: Check whether the writing and reading are consistent. If they are consistent, proceed to the next step.
[0069] Step S16, the FPGA chip continues to copy the remaining information of the BIN binary file in the USB disk, and also reads the file into SRAM in pages according to 65536 bytes per page.
[0070] Step S17, repeat the previous FLASH writing and verification until all BIN files in the USB flash drive are updated.
[0071] Step S18: After the detection and writing are completed, proceed to the next step.
[0072] Step S19: The FPGA chip executes the command to close the USB disk.
[0073] Step S20, the FPGA chip checks the connection status of the USB flash drive. The double flashing of LED1 indicates that the USB flash drive is disconnected.
[0074] Step S21, USB flash drive update completed.
[0075] Step S22, turn off the DIP switch 1, and then power on again to enter the formal mode.
[0076] See Figure 5 , the FLASH address mapping area in EPCQ format is divided into the factory program image hard core area (using address 0x000000-0x3BFFFF), the factory program image soft core area (using address 0x3C0000-0x3FFFFF), the user program image hard core area (using address 0x400000-0x7BFFFF), and the user program image soft core area (using address 0x7C0000-0x7FFFFF); the factory program mainly includes the FPGA program update method, including USB chip and RS485 interface chip to update the FPGA program. The user program is the formal program used in the device operation mode. According to the different functions implemented, it can update a separate user image hard core area, a separate user image soft core area, or a user image hard core area and soft core area at the same time.
[0077] [Example 2]
[0078] Add a dip switch to partition the process, see Figure 5 to Figure 7 , the function is distinguished by the dip switch when powered on. Dip switch 1 enables entering USB update mode 1, and the corresponding LED1 will flash to prompt; Dip switch 2 enables entering RS485 update mode 2, and the corresponding LED2 will flash to prompt; when dip switches 1 and 2 are turned off at the same time, it will jump to the formal user image mode 3, and the corresponding LED3 will flash to prompt. In mode 1, after the initial communication of the USB chip is completed, the USB disk update is completed by reading and writing the BIN binary file of the USB chip through the FPGA chip, and the dip switch is turned back to the closed state; in mode 2, after the communication handshake between the controller and the RS485 interface chip is completed, the RS485 interface chip update is completed by reading and writing the BIN binary file of the FPGA chip through the controller, and the dip switch is turned back to the closed state; mode 3 is used for normal device operation mode. After the dip switches 1 and 2 are turned off, the board is powered on to enter the user image area, and the user image area will be initialized; after the initialization is completed, the user image area is officially running, and the version number is checked to confirm that the program runs successfully.
[0079] The present invention utilizes the existing controller read-write circuit and U disk read-write circuit. In the formal program mode, the controller read-write circuit is used to realize communication with other electrical equipment, and the U disk read-write circuit is used to realize fault recording. In the update program mode, the controller read-write circuit and the U disk read-write circuit can realize the burning of the FPGA program respectively. In this way, the formal program mode and the update program mode both use the controller read-write circuit and the U disk read-write circuit. Since they are realized separately in time sharing, the functions do not affect each other, the structure is simple, and it is easy to realize; the FPGA reconfiguration process is to burn the FPGA program into the FLASH chip, which is equivalent to re-updating the FPGA program. There is no need to add a main control chip. The reconfiguration is completed by the FPGA chip, which saves costs; two program update methods are provided in addition to JTAG download, namely the controller read-write circuit and the U disk read-write circuit. The circuit distinguishes the update program mode and the formal program mode through the dip switch, and can update the hard core space or soft core space of the user program respectively; after the control panel shell of the SVG control cabinet is installed, when the user has an update demand, the traditional operation method is: the JTAG interface or AS interface is used to disassemble the panel shell, and then insert the downloader. When debugging in the factory, the test program also needs to be updated. Due to the large number of boards, improper disassembly and damage to the equipment are prone to occur during the operation of disassembling the control panel shell, which affects work efficiency. The U disk is connected to the USB chip through the port, and the host computer is connected to the RS485 chip through the port, which improves work efficiency.
Claims
1. A system integrating USB and RS485 to update CYCLONE V program, characterized in that: The invention comprises a main control board, which comprises a DSP, an FPGA, a JTAG download interface 1, a JTAG download interface 2, a controller read-write circuit, a dial switch / keyboard, a U disk read-write circuit, a communication circuit, a FLASH memory 1, a FLASH memory 2, a FLASH memory 3, and an SDRAM memory. The DSP and the FPGA are connected through ports. The DSP is respectively connected with the communication circuit, the dial switch / keyboard, the FLASH memory 1, the FLASH memory 2, and the JTAG download interface 1 through ports. The FPGA is respectively connected with the U disk read-write circuit, the controller read-write circuit, the SDRAM memory, the FLASH memory 3, and the JTAG download interface 2. The U disk read-write circuit comprises a USB chip and a U disk, and the USB chip and the U disk are connected through ports.
2. A system for updating CYCLONE V program by integrating USB and RS485 according to claim 1, characterized in that: The controller read-write circuit includes RS485 chip 2, which is connected to the host computer through a port. The controller read-write circuit is used for RS485 updating of FPGA program. The communication circuit is an RS485 communication circuit, including RS485 chip 1 and the host computer, which is connected to the host computer through a port.
3. A system for updating CYCLONE V program by integrating USB and RS485 according to claim 1, characterized in that: DSP uses ADSP24188 chip, FPGA uses 5CEA7F23 chip, USB chip uses CH376T chip, SDRAM memory uses IS42S16400J chip, FLASH memory 1 uses PB85RS2MC chip, FLASH memory 2 uses M25P16 chip, FLASH memory 3 uses EPCQ128A chip, which is used to store and update FPGA program, JTAG download interface 1 is used to download and update DSP program, JTAG download interface 1 is used to download and update DSP program, and JTAG download interface 2 is used to download and update FPGA program.
4. A system for updating CYCLONE V program by integrating USB and RS485 according to claim 1, characterized in that: It also includes a power supply module, which is used to provide DC power to the main control board.
5. A system for updating CYCLONE V program by integrating USB and RS485 according to claim 1, characterized in that: The DIP switch / keyboard is provided with switches and DIP numbers for selecting the corresponding communication interface.
6. A method for updating CYCLONE V program by integrating USB and RS485 according to any one of claims 1 to 5, characterized in that: CYCLONE V's FPGA completes program updates through the corresponding communication interface by building factory-imaged hard-core and soft-core programs. The FLASH memory completes the hard-core space or soft-core space update of the user program by selecting the corresponding address mapping. After the FPGA chip program is compiled, the corresponding download files of the hard-core and soft-core are converted into BIN binary files, so that the FPGA can directly read and write BIN binary files to the FLASH memory. The main control board communicates with the FPGA through the RS485 interface chip, transmits the byte size of the user program and the binary file, and updates the corresponding user program. The steps are as follows: S1, FPGA chip reads and writes USB chip data; S2. Insert the USB flash drive with the BIN burning file; S3, FPGA chip executes the command to open the USB disk; S4, the FPGA chip reads the capacity information of the BIN binary file in the USB flash drive, and after comparing it with the capacity of the SDRAM memory, determines the maximum capacity of each read; S / 5, FPGA chip erases the hard core or soft core FLASH program space of the user program; S6, the FPGA chip copies the BIN binary file data of the USB flash drive, and reads the BIN binary file into the SDRAM memory in pages according to the bytes set for each page; S7, the FPGA chip writes the mirror area data into the user FLASH program space that needs to be updated in pages; S8, the FPGA chip reads and writes the mirror area data and the U disk data to compare, and checks whether the FPGA write and read are consistent. If not, return to step S4 until the write and read are consistent. S9, the FPGA chip continues to copy the remaining data information of the BIN binary file in the USB flash drive, and returns to execute steps S6-S8 until all BIN files in the USB flash drive are updated; S10, FPGA executes the command to close the USB disk.
