CN112925569A - Firmware data processing method, device, equipment and storage medium - Google Patents

Firmware data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112925569A
CN112925569A CN202110206101.4A CN202110206101A CN112925569A CN 112925569 A CN112925569 A CN 112925569A CN 202110206101 A CN202110206101 A CN 202110206101A CN 112925569 A CN112925569 A CN 112925569A
Authority
CN
China
Prior art keywords
firmware data
programmable logic
logic device
channel
data memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110206101.4A
Other languages
Chinese (zh)
Inventor
张威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sundray Technologies Co ltd
Original Assignee
Shenzhen Sundray Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sundray Technologies Co ltd filed Critical Shenzhen Sundray Technologies Co ltd
Priority to CN202110206101.4A priority Critical patent/CN112925569A/en
Publication of CN112925569A publication Critical patent/CN112925569A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a firmware data processing method, which is applied to a programmable logic device, wherein the programmable logic device is connected with a firmware data memory through a channel selector, and the firmware data memory is used for storing the programmable logic device and firmware data of each chip connected with the programmable logic device; the method comprises the following steps: reading and loading firmware data of a programmable logic device in a firmware data memory after the power-on starting, the first channel of the channel selector is started, and the second channel is closed; and after the firmware data of the programmable logic device is loaded, controlling the first channel to be closed and the second channel to be opened, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory. By applying the technical scheme provided by the application, the firmware data in the board card can be quickly programmed or upgraded, and the processing efficiency of the firmware data is improved. The application also discloses a firmware data processing device, equipment and a storage medium, which have corresponding technical effects.

Description

Firmware data processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a firmware data processing method, apparatus, device, and storage medium.
Background
In a board card, a Programmable logic device is usually deployed, and a plurality of chips with different functions, such as an EEPROM (Electrically Erasable Programmable read only memory) chip, a FLASH memory (FLASH memory) chip, and the like, are also deployed, where the Programmable logic device and the different chips correspond to different firmware data.
At present, when a board card is produced, firmware data is required to be programmed on a programmable logic device and each chip, different types of firmware data are required to be programmed by using corresponding types of downloaders, and the programming is required for each type of firmware data, so that the production cost is high, the programming efficiency of the firmware data is low, the production flow is complex, and the programming error in the production process is easily caused.
In addition, in the use process of the board card, when the upgrade is needed, only part of firmware data, for example, the firmware data of the programmable logic device, can be upgraded, other firmware data are fixed during production and cannot be modified online, if the firmware data has a problem, the firmware data needs to be repaired and modified, the operation is complex, the processing period is long, and the use is influenced.
Disclosure of Invention
The application aims to provide a firmware data processing method, a firmware data processing device, firmware data processing equipment and a storage medium, so that the production cost is reduced during board card production, the firmware data programming efficiency is improved, the production flow is simplified, programming errors in the production process are avoided as much as possible, firmware data can be conveniently upgraded in the use process of the board card, the operation is simple, the processing period is short, and the influence on the use is avoided as much as possible.
In order to solve the technical problem, the application provides the following technical scheme:
a firmware data processing method is applied to a programmable logic device, the programmable logic device is connected with a firmware data memory through a channel selector, and the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device; the method comprises the following steps:
when the power-on is started, the first channel of the channel selector is opened, and the second channel of the channel selector is closed, the firmware data of the programmable logic device in the firmware data memory is read and loaded;
and after the firmware data of the programmable logic device is loaded, controlling the first channel to be closed and the second channel to be opened, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory.
In one embodiment of the present application, the firmware data stored in the firmware data memory are distinguished by different address spaces.
In a specific embodiment of the present application, the reading and loading the firmware data of each chip connected to the programmable logic device in the firmware data memory includes:
sequentially reading each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory;
and for each read firmware data, loading the current firmware data to a chip connected with the corresponding programmable logic device according to the address space of the current firmware data in the firmware data memory.
In one embodiment of the present application,
the sequentially reading each firmware data except the firmware data of the programmable logic device in the firmware data memory includes:
sequentially reading each other firmware data except the firmware data of the programmable logic device in the firmware data memory through a serial peripheral interface;
the loading the current firmware data to a chip connected with the corresponding programmable logic device according to an address space of the current firmware data in the firmware data memory includes:
determining a chip connected with the programmable logic device corresponding to the current firmware data according to the address space of the current firmware data in the firmware data memory;
and simulating an interface of a chip corresponding to the current firmware data, and loading the current firmware data into the corresponding chip.
In one embodiment of the present application, the method further includes:
receiving an upgrading instruction;
controlling the first channel to be closed and the second channel to be opened;
according to the upgrading instruction, erasing and rewriting the firmware data stored in the firmware data memory;
and after a hot reset instruction is received and restarted, the first channel is opened and the second channel is closed, the step of reading and loading the firmware data of the programmable logic device in the firmware data memory is repeatedly executed.
In a specific embodiment of the present application, the erasing and programming the firmware data stored in the firmware data memory according to the upgrade instruction includes:
determining firmware data to be upgraded according to the upgrading instruction;
erasing the address space for storing the firmware data to be upgraded in the firmware data memory;
and writing new firmware data in the address space of the firmware data to be upgraded.
In a specific embodiment of the present application, the upgrade instruction is issued by a processor, and the method further includes:
if the interface between the processor and the programmable logic device is a serial peripheral interface, the serial peripheral interface of the processor is transmitted to the serial peripheral interface of the firmware data memory;
and if the interface between the processor and the programmable logic device is not a serial peripheral interface, converting the interface between the processor and the programmable logic device into a serial peripheral interface through an interface conversion circuit.
A firmware data processing device is applied to a programmable logic device, the programmable logic device is connected with a firmware data memory through a channel selector, and the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device; the device comprises:
the first firmware data loading module is used for reading and loading the firmware data of the programmable logic device in the firmware data memory after the channel selector is powered on and started, and the first channel of the channel selector is opened and the second channel of the channel selector is closed;
and the second firmware data loading module is used for controlling the first channel to be closed and the second channel to be opened after the firmware data loading of the programmable logic device is finished, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory.
A firmware data processing device, comprising:
a program memory for storing a computer program;
a channel selector;
the firmware data memory is used for storing the firmware data of the programmable logic device and the firmware data of each chip connected with the programmable logic device;
the programmable logic device connected with the firmware data memory through the channel selector is used for realizing the steps of the firmware data processing method when the computer program is executed.
A computer-readable storage medium having stored thereon a computer program which, when executed by a programmable logic device, implements the steps of the firmware data processing method of any one of the above.
By applying the technical scheme provided by the embodiment of the application, when the board card is produced, the programmable logic device and the firmware data of each chip connected with the programmable logic device can be stored in the firmware data memory, after the programmable logic device is powered on and started, the first channel of the channel selector is opened, and the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of each chip connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chip, and thus, the firmware data burning operation during the board card production is completed. The programmable logic device and the firmware data of each chip connected with the programmable logic device are stored in the firmware data memory, a downloader is not needed to be used for programming, and the programming is only needed to be performed once in a unified way no matter how many types of firmware data exist, so that the production cost is reduced, the firmware data programming efficiency is improved, the production flow is simplified, and programming errors in the production process can be avoided as much as possible.
In addition, when the board card is used and needs to be upgraded, the firmware data of the programmable logic device and the chips connected with the programmable logic device are stored in the firmware data memory according to the operation process, wherein the firmware data includes the firmware data which needs to be upgraded, the programmable logic device is powered on and started, the first channel of the channel selector is opened, the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, and thus the upgrading operation is completed. Any firmware data in the board card can be upgraded, the operation is simple, the processing period is short, and the influence on the use is avoided as much as possible.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of an overall implementation of an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of a firmware data processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a process of power-on loading of firmware data of a programmable logic device according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a process of loading other firmware data on the board card in the embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a flow of upgrading firmware data according to an embodiment of the present application;
FIG. 6 is a block diagram of a firmware data processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a firmware data processing device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a firmware data processing method, which can be applied to a programmable logic device, such as a programmable logic device in a board card of a rack-mounted switch. A plurality of board cards of different types can be deployed in the switch, and each board card has a plurality of firmware data to be programmed or upgraded on line. The programmable logic device is connected with the firmware data memory through the channel selector, the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device, and the firmware data memory can be a FLASH chip. The firmware data in the board card is stored in the firmware data memory, and meanwhile, the function of backing up the firmware data can be achieved.
Programmable Logic Devices (PLDs) are produced as a general purpose integrated circuit whose Logic functions are determined by user programming of the Device. Firmware (firmware) is typically stored in an Electrically Erasable read only memory (EEPROM) or FLASH chip in the device, and is typically a program that can be upgraded by a user through a specific refresh program.
As shown in fig. 1, the programmable logic device 110 is connected to a firmware data memory 130 through an SPI (Serial Peripheral Interface) and a channel selector 120. The channel selector 120 may perform control of at least two channels, a first channel being a channel shown above in the channel selector 120, i.e. channel 121, and a second channel being a channel shown below in the channel selector 120, i.e. channel 122. The channels are used to complete the data transfer between programmable logic device 110 and firmware data memory 130. The SPI interface may be multi-wire, and may include several signals as follows: CLK (clock signal), CS (chip select signal), MOSI (Master Output/Slave Input), MISO (Master Input/Slave Output), OE (Output enable control signal), and the like. The programmable logic device 110 may be connected to other chips through various interfaces, such as an EEPROM chip connected through an I2C (Integrated Circuit bus) interface, a FLASH chip connected through an SPI interface, a multiphase power chip, a clock chip, and a CPU chip connected through a CPU (central processing unit) interface, where different chips correspond to different firmware data.
When the board card is produced, the programmable logic device and the firmware data of each chip connected with the programmable logic device can be stored in the firmware data storage, the programmable logic device is powered on and started, after the first channel of the channel selector is opened and the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data storage and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of each chip connected with the programmable logic device is read from the firmware data storage and loaded into the corresponding chip, and therefore the firmware data programming operation during the board card production is completed. The programmable logic device and the firmware data of each chip connected with the programmable logic device are stored in the firmware data memory, a downloader is not needed to be used for programming, and the programming is only needed to be performed once in a unified way no matter how many types of firmware data exist, so that the production cost is reduced, the firmware data programming efficiency is improved, the production flow is simplified, and programming errors in the production process can be avoided as much as possible.
In addition, when the board card is used and needs to be upgraded, the firmware data of the programmable logic device and the chips connected with the programmable logic device are stored in the firmware data memory according to the operation process, wherein the firmware data includes the firmware data which needs to be upgraded, the programmable logic device is powered on and started, the first channel of the channel selector is opened, the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, and therefore, the online upgrading operation is completed. Any firmware data in the board card can be upgraded on line, the operation is simple, the processing period is short, and the influence on the use is avoided as much as possible.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, a flowchart of an implementation of a firmware data processing method provided in an embodiment of the present application is shown, where the method may include the following steps:
s210: and reading and loading the firmware data of the programmable logic device in the firmware data memory after the power-on starting, the first channel of the channel selector is opened and the second channel is closed.
In the embodiment of the present application, the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected to the programmable logic device. When the board card is produced, all firmware data needing to be written can be written into the firmware data memory in advance, and when the board card needs to be upgraded in the using process, the corresponding firmware data in the firmware data memory can be updated. The firmware data stored in the firmware data memory may be distinguished by different address spaces.
When the programmable logic device is powered on and started, the default state is as follows: the first channel of the channel selector is opened and the second channel is closed. Default channel selection may be achieved by external pull-up and pull-down resistors to the channel selector. After the power-on start, the first channel of the channel selector is opened, and the second channel is closed, the firmware data of the programmable logic device can be read from the firmware data memory through the first channel, and the read firmware data is loaded into the programmable logic device, so that the firmware data loading of the programmable logic device is completed.
As shown in fig. 3, the first channel of the channel selector is channel 1, the second channel is channel 2, and address space 1, address space 2, address space … …, and address space n of the firmware data memory store corresponding firmware data, respectively. Assume that address space 1 stores firmware data for a programmable logic device. When the programmable logic device is powered on and started, the default channel 1 is opened, the channel 2 is closed, and the firmware data loading of the programmable logic device can be automatically realized by the plug-in firmware data memory of the programmable logic device and the SPI interface of the programmable logic device.
S220: and after the firmware data of the programmable logic device is loaded, controlling the first channel to be closed and the second channel to be opened, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory.
The firmware data memory stores firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device. After the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, read each firmware data in the firmware data memory through the second channel, and load each read firmware data into a chip connected with the corresponding programmable logic device. Thus, the loading of the firmware data of the programmable logic device and each chip connected with the programmable logic device is completed.
By applying the method provided by the embodiment of the application, when the board card is produced, the firmware data of the programmable logic device and the chips connected with the programmable logic device can be stored in the firmware data memory, after the programmable logic device is powered on and started, the first channel of the channel selector is opened, and the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, and thus, the firmware data burning operation during the board card production is completed. The programmable logic device and the firmware data of each chip connected with the programmable logic device are stored in the firmware data memory, a downloader is not needed to be used for programming, and the programming is only needed to be performed once in a unified way no matter how many types of firmware data exist, so that the production cost is reduced, the firmware data programming efficiency is improved, the production flow is simplified, and programming errors in the production process can be avoided as much as possible.
In addition, when the board card is used and needs to be upgraded, the firmware data of the programmable logic device and the chips connected with the programmable logic device are stored in the firmware data memory according to the operation process, wherein the firmware data includes the firmware data which needs to be upgraded, the programmable logic device is powered on and started, the first channel of the channel selector is opened, the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, and thus the upgrading operation is completed. Any firmware data in the board card can be upgraded, the operation is simple, the processing period is short, and the influence on the use is avoided as much as possible.
In one embodiment of the present application, step S220 may include the steps of:
the method comprises the following steps: sequentially reading each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory;
step two: and for each read firmware data, loading the current firmware data to a chip connected with the corresponding programmable logic device according to the address space of the current firmware data in the firmware data memory.
For convenience of description, the above two steps are combined for illustration.
After the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, and then each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory is read in sequence. Each firmware data stored in the firmware data memory may be distinguished by an address space in which different firmware data is stored.
For each read firmware data, calculating an address offset according to an address space of the current firmware data in a firmware data memory, identifying the current firmware data according to the address offset, determining which chip connected with the programmable logic device the current firmware data corresponds to, and loading the current firmware data onto the corresponding chip. And the quick loading of the firmware data of each chip connected with the programmable logic device is realized.
In an embodiment of the application, the programmable logic device may sequentially read each piece of firmware data, except the firmware data of the programmable logic device, in the firmware data memory through the serial peripheral interface, and correspondingly, for each piece of read firmware data, a chip connected to the programmable logic device corresponding to the current firmware data may be determined according to an address space of the current firmware data in the firmware data memory, an interface of the chip corresponding to the current firmware data is simulated, and the current firmware data is loaded into the corresponding chip.
In this embodiment, the programmable logic device may sequentially read each of the other firmware data in the firmware data memory except the firmware data of the programmable logic device through a serial peripheral interface, that is, an SPI interface. For each read firmware data, determining a chip connected with the programmable logic device corresponding to the current firmware data according to an address space of the current firmware data in the firmware data memory. The interface types of the programmable logic device connections to the various chips may be the same or different. After determining the chip corresponding to the current firmware data, an interface of the chip may be simulated, and the current firmware data is loaded into the chip.
The interface of a common EEPROM or FLASH chip is an SPI interface or an I2C interface, for the SPI interface chip, different firmware data can be selected through a CS chip select signal in the SPI interface, and for the I2C interface chip, different firmware data can be distinguished through a device address of I2C. When other interfaces exist, the programmable logic device can flexibly simulate different interface circuits, and loads firmware data in different address spaces of the firmware data memory into different types of chips through the interface conversion circuit.
As shown in fig. 4, the firmware data stored in the address space 2 of the firmware data memory corresponds to a chip of the I2C interface, the channel 2 may be directly connected to the firmware data memory external to the programmable logic device through the analog SPI interface of the programmable logic device, and the direct data transmission between the external firmware data memory and the programmable logic device may be realized through the SPI interface protocol. The different firmware data in the plug-in firmware data memory are distinguished through address offset, the programmable logic device can read the firmware data in the address space 2 into the programmable logic device through an SPI (serial peripheral interface) protocol, and when the data are read, the different firmware data can be identified according to the address offset of the plug-in firmware data memory. Then, through the SPI to I2C interface circuit, the read firmware data is written into the chip of the I2C interface through the I2C interface protocol, and after all the firmware data in the address space 2 is written into the chip of the I2C interface, the writing of one firmware data is completed. The programmable logic device can switch the interface conversion circuit, convert to the chip of SPI interface, can read the firmware data in the address space 3 of firmware data memory to the programmable logic device through SPI interface protocol, then write in the chip of SPI interface with the firmware data of SPI interface through the mode of data passthrough. Similarly, the programming of the firmware data of other interfaces can be completed in sequence when the power is on.
In one embodiment of the present application, the method may further comprise the steps of:
the first step is as follows: receiving an upgrading instruction;
the second step is that: controlling the first channel to be closed and the second channel to be opened;
the third step: according to the upgrading instruction, erasing and rewriting the firmware data stored in the firmware data memory;
the fourth step: and after a hot reset instruction is received and restarted, the first channel is opened and the second channel is closed, the step of reading and loading the firmware data of the programmable logic device in the firmware data memory is repeatedly executed.
For convenience of description, the above steps are combined for illustration.
In the use process of the board card, if the upgrading requirement exists, a corresponding upgrading instruction can be sent to the programmable logic device. After receiving the upgrading instruction, the programmable logic device can control the first channel to be closed and the second channel to be opened, and then according to the upgrading instruction, the firmware data stored in the firmware data memory is erased and rewritten through the second channel.
According to the upgrade instruction, it can be determined whether all firmware data on the board card or the specified firmware data is to be upgraded. If all the firmware data on the board card is to be upgraded, all the firmware data stored in the firmware data memory can be erased and rewritten through the second channel. If the specified firmware data is to be upgraded, the specified firmware data stored in the firmware data memory can be erased and rewritten through the second channel, and other firmware data which does not need to be upgraded can be unchanged.
Specifically, the firmware data to be upgraded may be determined according to the upgrade instruction, where the firmware data to be upgraded is the firmware data that needs to be upgraded currently. And carrying out erasing operation on the address space of the firmware data to be upgraded stored in the firmware data memory so as to erase the firmware data before the address space. And writing new firmware data in the address space of the firmware data to be upgraded, and updating the firmware data.
After the programmable logic device erases and rewrites the firmware data stored in the firmware data memory, if a hot reset instruction is received, the programmable logic device can be restarted, and when the programmable logic device is restarted, the first channel is opened by default, and the second channel is closed by default. After the programmable logic device is restarted, the first channel is opened, and the second channel is closed, the step of reading and loading the firmware data of the programmable logic device in the firmware data memory can be repeatedly executed, and after the firmware data loading of the programmable logic device is completed, the first channel is controlled to be closed, the second channel is controlled to be opened, and the firmware data of each chip connected with the programmable logic device in the firmware data memory is read and loaded.
After the programmable logic device erases and rewrites the firmware data stored in the firmware data memory, part or all of the firmware data stored in the firmware data memory has changed, and when the programmable logic device is powered on again, the programmable logic device reads and loads corresponding firmware data from the firmware data memory again, and the read and loaded firmware data is necessary to be the firmware data which needs to be used currently and contains upgraded firmware data. The upgrade of the firmware data is completed.
In an embodiment of the present application, the upgrade instruction is issued by a processor, and the method may further include the steps of:
if the interface between the processor and the programmable logic device is a serial peripheral interface, the serial peripheral interface of the transparent transmission processor is connected to the serial peripheral interface of the firmware data memory;
if the interface between the processor and the programmable logic device is not the serial peripheral interface, the interface between the processor and the programmable logic device is converted into the serial peripheral interface through the interface conversion circuit.
In an embodiment of the present application, the processor CPU may issue an upgrade instruction to the programmable logic device. If the interface between the processor and the programmable logic device is a serial peripheral interface, the programmable logic device can transmit the serial peripheral interface of the processor to the serial peripheral interface of the firmware data memory, and erase and rewrite corresponding firmware data stored in the firmware data memory. If the interface between the processor and the programmable logic device is not a serial peripheral interface, the programmable logic device can flexibly carry out hardware design, an interface conversion circuit is designed, the interface between the processor and the programmable logic device is converted into the serial peripheral interface through the interface conversion circuit, and corresponding firmware data stored in the firmware data memory are erased and rewritten.
As shown in fig. 5, the CPU may send an upgrade instruction to the programmable logic device, and the programmable logic device may switch the channel selection signal to control the channel 1 to be closed and the channel 2 to be opened. If the interface between the CPU and the programmable logic device is an SPI interface, the programmable logic device directly transmits the SPI interface of the CPU to the SPI of the plug-in firmware data memory, and when the interface between the CPU and the programmable logic device is not the SPI interface, the programmable logic device can design an interface conversion circuit to convert the interface between the CPU and the programmable logic device into an SPI interface protocol. The programmable logic device can erase and rewrite the firmware data to the corresponding address space of the plug-in firmware data memory according to the upgrading instruction. If a single firmware data needs to be upgraded, erasing and programming data in an address space corresponding to the firmware data, and if all the firmware data needs to be upgraded, erasing and programming the address space corresponding to all the firmware data. After the CPU finishes erasing and rewriting the firmware data to the externally-hung firmware data memory, the firmware data memory stores new firmware data, the whole board card can be restarted in a power-down mode through hot reset, and the firmware data in the firmware data memory are sequentially read and loaded according to the logic of the programmable logic device after the restart, so that the upgrading of the firmware data is finished.
By applying the technical scheme provided by the embodiment of the application, no matter how many firmware data and how many firmware data types are produced by the board card, the writing can be finished by one-time writing, so that the production cost can be saved, the production flow can be simplified, the possibility of production errors can be reduced, and the production efficiency can be improved. Meanwhile, in the use process of the board card, all firmware data of different types can be upgraded at one time during upgrading, and upgrading efficiency is improved.
Corresponding to the above method embodiment, the embodiment of the present application further provides a firmware data processing apparatus, which is applied to a programmable logic device, where the programmable logic device is connected to a firmware data memory through a channel selector, and the firmware data memory is used to store firmware data of the programmable logic device and firmware data of each chip connected to the programmable logic device; the firmware data processing apparatus described below and the firmware data processing method described above may be referred to in correspondence with each other.
Referring to fig. 6, the apparatus may include the following modules:
a first firmware data loading module 610, configured to read and load firmware data of a programmable logic device in a firmware data memory after power-on start, a first channel of a channel selector is opened, and a second channel is closed;
and a second firmware data loading module 620, configured to control the first channel to be closed and the second channel to be opened after the firmware data of the programmable logic device is loaded, and read and load the firmware data of each chip connected to the programmable logic device in the firmware data memory.
By applying the device provided by the embodiment of the application, when the board card is produced, the firmware data of the programmable logic device and the chips connected with the programmable logic device can be stored in the firmware data memory, after the programmable logic device is powered on and started, the first channel of the channel selector is opened, and the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, and after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, so that the firmware data burning operation during the board card production is completed. The programmable logic device and the firmware data of each chip connected with the programmable logic device are stored in the firmware data memory, a downloader is not needed to be used for programming, and the programming is only needed to be performed once in a unified way no matter how many types of firmware data exist, so that the production cost is reduced, the firmware data programming efficiency is improved, the production flow is simplified, and programming errors in the production process can be avoided as much as possible.
In addition, when the board card is used and needs to be upgraded, the firmware data of the programmable logic device and the chips connected with the programmable logic device are stored in the firmware data memory according to the operation process, wherein the firmware data includes the firmware data which needs to be upgraded, the programmable logic device is powered on and started, the first channel of the channel selector is opened, the second channel of the channel selector is closed, the programmable logic device can read the firmware data of the programmable logic device from the firmware data memory and load the firmware data into the programmable logic device, after the firmware data of the programmable logic device is loaded, the programmable logic device can control the first channel to be closed and the second channel to be opened, the firmware data of the chips connected with the programmable logic device is read from the firmware data memory and is loaded into the corresponding chips, and thus the upgrading operation is completed. Any firmware data in the board card can be upgraded, the operation is simple, the processing period is short, and the influence on the use is avoided as much as possible.
In one embodiment of the present application, the firmware data stored in the firmware data memory are distinguished by different address spaces.
In a specific embodiment of the present application, the second firmware data loading module 620 is configured to:
sequentially reading each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory;
and for each read firmware data, loading the current firmware data to a chip connected with the corresponding programmable logic device according to the address space of the current firmware data in the firmware data memory.
In a specific embodiment of the present application, the second firmware data loading module 620 is configured to:
sequentially reading each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory through the serial peripheral interface;
for each read firmware data, determining a chip connected with the programmable logic device corresponding to the current firmware data according to the address space of the current firmware data in the firmware data memory;
and simulating an interface of a chip corresponding to the current firmware data, and loading the current firmware data into the corresponding chip.
In a specific embodiment of the present application, the apparatus further includes a firmware data update module, configured to:
receiving an upgrading instruction;
controlling the first channel to be closed and the second channel to be opened;
according to the upgrading instruction, erasing and rewriting the firmware data stored in the firmware data memory;
and after a hot reset instruction is received and restarted, the first channel is opened and the second channel is closed, the step of reading and loading the firmware data of the programmable logic device in the firmware data memory is repeatedly executed.
In one embodiment of the present application, the firmware data update module is configured to:
determining firmware data to be upgraded according to the upgrading instruction;
erasing the address space storing the firmware data to be upgraded in the firmware data memory;
and writing new firmware data in the address space of the firmware data to be upgraded.
In a specific embodiment of the present application, the upgrade instruction is issued by a processor, and the apparatus further includes an interface control module configured to:
under the condition that the interface between the processor and the programmable logic device is a serial peripheral interface, the serial peripheral interface of the transparent transmission processor is connected to the serial peripheral interface of the firmware data memory;
and under the condition that the interface between the processor and the programmable logic device is not a serial peripheral interface, converting the interface between the processor and the programmable logic device into the serial peripheral interface through an interface conversion circuit.
Corresponding to the above method embodiment, an embodiment of the present application further provides a firmware data processing device, as shown in fig. 7, the device includes:
a program memory 140 for storing computer programs;
a channel selector 120;
a firmware data memory 130 for storing firmware data of the programmable logic device 110 and firmware data of each chip connected to the programmable logic device 110;
the programmable logic device 110, connected to the firmware data memory 130 through the channel selector 120, is configured to implement the steps of any one of the above firmware data processing methods when executing the computer program.
Corresponding to the above method embodiments, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a programmable logic device, the steps of the firmware data processing method are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present application are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A firmware data processing method is characterized by being applied to a programmable logic device, wherein the programmable logic device is connected with a firmware data memory through a channel selector, and the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device; the method comprises the following steps:
when the power-on is started, the first channel of the channel selector is opened, and the second channel of the channel selector is closed, the firmware data of the programmable logic device in the firmware data memory is read and loaded;
and after the firmware data of the programmable logic device is loaded, controlling the first channel to be closed and the second channel to be opened, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory.
2. The method of claim 1, wherein the firmware data stored in the firmware data memory are distinguished by different address spaces.
3. The method of claim 1, wherein the reading and loading the firmware data of each chip connected to the programmable logic device in the firmware data memory comprises:
sequentially reading each piece of firmware data except the firmware data of the programmable logic device in the firmware data memory;
and for each read firmware data, loading the current firmware data to a chip connected with the corresponding programmable logic device according to the address space of the current firmware data in the firmware data memory.
4. The method of claim 3,
the sequentially reading each firmware data except the firmware data of the programmable logic device in the firmware data memory includes:
sequentially reading each other firmware data except the firmware data of the programmable logic device in the firmware data memory through a serial peripheral interface;
the loading the current firmware data to a chip connected with the corresponding programmable logic device according to an address space of the current firmware data in the firmware data memory includes:
determining a chip connected with the programmable logic device corresponding to the current firmware data according to the address space of the current firmware data in the firmware data memory;
and simulating an interface of a chip corresponding to the current firmware data, and loading the current firmware data into the corresponding chip.
5. The method of any one of claims 1 to 4, further comprising:
receiving an upgrading instruction;
controlling the first channel to be closed and the second channel to be opened;
according to the upgrading instruction, erasing and rewriting the firmware data stored in the firmware data memory;
and after a hot reset instruction is received and restarted, the first channel is opened and the second channel is closed, the step of reading and loading the firmware data of the programmable logic device in the firmware data memory is repeatedly executed.
6. The method of claim 5, wherein erasing and programming the firmware data stored in the firmware data memory according to the upgrade instructions comprises:
determining firmware data to be upgraded according to the upgrading instruction;
erasing the address space for storing the firmware data to be upgraded in the firmware data memory;
and writing new firmware data in the address space of the firmware data to be upgraded.
7. The method of claim 5, wherein the upgrade instruction is issued by a processor, the method further comprising:
if the interface between the processor and the programmable logic device is a serial peripheral interface, the serial peripheral interface of the processor is transmitted to the serial peripheral interface of the firmware data memory;
and if the interface between the processor and the programmable logic device is not a serial peripheral interface, converting the interface between the processor and the programmable logic device into a serial peripheral interface through an interface conversion circuit.
8. The firmware data processing device is applied to a programmable logic device, the programmable logic device is connected with a firmware data memory through a channel selector, and the firmware data memory is used for storing firmware data of the programmable logic device and firmware data of each chip connected with the programmable logic device; the device comprises:
the first firmware data loading module is used for reading and loading the firmware data of the programmable logic device in the firmware data memory after the channel selector is powered on and started, and the first channel of the channel selector is opened and the second channel of the channel selector is closed;
and the second firmware data loading module is used for controlling the first channel to be closed and the second channel to be opened after the firmware data loading of the programmable logic device is finished, and reading and loading the firmware data of each chip connected with the programmable logic device in the firmware data memory.
9. A firmware data processing device, comprising:
a program memory for storing a computer program;
a channel selector;
the firmware data memory is used for storing the firmware data of the programmable logic device and the firmware data of each chip connected with the programmable logic device;
the programmable logic device, connected to the firmware data memory via the channel selector, is configured to implement the steps of the firmware data processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a programmable logic device, implements the steps of the firmware data processing method according to any one of claims 1 to 7.
CN202110206101.4A 2021-02-24 2021-02-24 Firmware data processing method, device, equipment and storage medium Pending CN112925569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110206101.4A CN112925569A (en) 2021-02-24 2021-02-24 Firmware data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110206101.4A CN112925569A (en) 2021-02-24 2021-02-24 Firmware data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112925569A true CN112925569A (en) 2021-06-08

Family

ID=76171588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110206101.4A Pending CN112925569A (en) 2021-02-24 2021-02-24 Firmware data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112925569A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535213A (en) * 2021-07-21 2021-10-22 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device
CN114153477A (en) * 2021-10-29 2022-03-08 浪潮(北京)电子信息产业有限公司 Method, device, system, equipment and medium for upgrading firmware of PCIE (peripheral component interface express) driver card
CN115097900A (en) * 2022-07-22 2022-09-23 苏州浪潮智能科技有限公司 Clock output configuration device and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130011186A (en) * 2011-07-20 2013-01-30 엘에스산전 주식회사 A method for downloading firmware of module for plc
WO2016166799A1 (en) * 2015-04-13 2016-10-20 三菱電機株式会社 Control system and programmable logic controller
CN106775791A (en) * 2015-11-20 2017-05-31 海思光电子有限公司 The method and optical module of firmware loads in optical module
CN110073333A (en) * 2017-11-03 2019-07-30 华为技术有限公司 Restore method, system and the FPGA device of the logic in fpga chip
CN110120877A (en) * 2018-02-05 2019-08-13 大唐移动通信设备有限公司 A kind of configuration method of the parameter of the configuration circuit and exchange chip of exchange chip
CN111930575A (en) * 2020-07-01 2020-11-13 联想(北京)有限公司 Firmware acquisition method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130011186A (en) * 2011-07-20 2013-01-30 엘에스산전 주식회사 A method for downloading firmware of module for plc
WO2016166799A1 (en) * 2015-04-13 2016-10-20 三菱電機株式会社 Control system and programmable logic controller
CN106775791A (en) * 2015-11-20 2017-05-31 海思光电子有限公司 The method and optical module of firmware loads in optical module
CN110073333A (en) * 2017-11-03 2019-07-30 华为技术有限公司 Restore method, system and the FPGA device of the logic in fpga chip
CN110120877A (en) * 2018-02-05 2019-08-13 大唐移动通信设备有限公司 A kind of configuration method of the parameter of the configuration circuit and exchange chip of exchange chip
CN111930575A (en) * 2020-07-01 2020-11-13 联想(北京)有限公司 Firmware acquisition method and device and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535213A (en) * 2021-07-21 2021-10-22 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device
CN113535213B (en) * 2021-07-21 2024-03-29 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device
CN114153477A (en) * 2021-10-29 2022-03-08 浪潮(北京)电子信息产业有限公司 Method, device, system, equipment and medium for upgrading firmware of PCIE (peripheral component interface express) driver card
CN115097900A (en) * 2022-07-22 2022-09-23 苏州浪潮智能科技有限公司 Clock output configuration device and method
CN115097900B (en) * 2022-07-22 2023-08-08 浪潮(山东)计算机科技有限公司 Clock output configuration device and method

Similar Documents

Publication Publication Date Title
CN112925569A (en) Firmware data processing method, device, equipment and storage medium
CN107704285B (en) Multi-version configuration chip, system and method for field programmable gate array
CN110941444B (en) Upgrade configuration logic circuit, method and system and programmable logic device
US8386694B2 (en) Memory device, its access method, and memory system
US20090198770A1 (en) System and method of updating codes in controller
EP3518097A2 (en) Firmware updating method and electronic device using the same
JPH0812651B2 (en) Data processing system and method of operating data processing system
CN112000351B (en) Updating method, updating device, updating equipment and storage medium of BMC (baseboard management controller) firmware
CN104200843A (en) Flash memory burner, burning system and burning method
US7984239B2 (en) Control program download device
JP2000065899A (en) Semiconductor device, and its data rewriting method
CN116541032B (en) Data burning method, device, equipment and computer storage medium
US5802268A (en) Digital processor with embedded eeprom memory
CN111813432A (en) FPGA configuration upgrading method and FPGA platform
CN101667133A (en) Method for updating firmware and chip updating firmware by using same
CN112306937B (en) Setting selection circuit, method, device and medium for mainboard device in server
JP2014050137A (en) Inverter device
US6598176B1 (en) Apparatus for estimating microcontroller and method thereof
KR19980054349A (en) Optional automatic setting circuit
CN114281390A (en) Zynq 7000-based online upgrading system and method
CN111796839A (en) Controller program management method and device
CN106548311B (en) Inventory management setting system
CN111026428A (en) System and method capable of simultaneously remotely updating FPGA firmware programs in multiple board cards on line
KR100290280B1 (en) Microcontroller with Programmable Flash Memory
CN112269564B (en) OTP ROM programming method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination