Pcie embedded device program updating method and related device
By introducing an update control chip into the PCIE device, remote program updates are achieved, solving the problem of frequent FLASH chip erasing and device restarts, and improving the maintainability and operating efficiency of the device.
Patent Information
- Application Number
- CN202410765716.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Program updates for existing PCIE devices require manual on-site operations, and frequent erasing of the FLASH chip shortens its lifespan. The device needs to be restarted after the update, affecting the stability of the device during long-term power-on operation.
The update control chip receives remote commands, switches the main control chip to the slave configuration mode, stops the read and write operations on the FLASH chip, and updates the firmware data through the target program, supporting remote management and updates.
It reduces the number of times the FLASH chip needs to be erased and written, prolongs its life, avoids device restarts, improves the security and stability of updates, and enhances the maintainability and management efficiency of the device.
Smart Images

Figure CN118484221B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the computer field, more particularly, the present application relates to a pcie embedded device program updating method and related device. BACKGROUND
[0002] Most of the existing pcie devices are mounted in industrial computers, and the program updating method is mostly manually solidifying new programs. Or using bootloader, the host chip must support this function to use, and the new program is loaded into the FLASH chip through the peripheral interface to complete the program upgrade. Manually completing program upgrade needs to spend time and manpower, and the operator needs to operate on site, which is not very convenient for some remote or large-scale device management. Although using bootloader can realize remote updating, it needs the support of the host chip, and frequent erasing and writing of the FLASH chip will reduce its service life, and after updating, the device needs to be reset to run the new function, which will cause inconvenience in some long-term power-on devices. SUMMARY
[0003] A series of simplified concepts are introduced in the summary part, which will be further described in detail in the specific embodiment part. The summary part of the present application does not mean to try to limit the key features and necessary technical features of the claimed technical solutions, and does not mean to try to determine the protection scope of the claimed technical solutions.
[0004] In order to solve the problem that frequent erasing and writing of the FLASH chip will reduce its service life, and after updating, the device needs to be reset to run the new function, which will cause inconvenience in some long-term power-on devices, in the first aspect, the present application provides a pcie embedded device program updating method, the pcie embedded device includes a host chip and an update control chip, and the method comprises:
[0005] In the case that the update control chip receives an update command sent by the host computer through a remote transmission mode, the update control chip obtains target program firmware data from the host computer based on the update command, and the host computer stores different program firmware data;
[0006] The update control chip controls the working mode of the host chip to switch from the master configuration mode to the slave configuration mode, wherein the host chip stops the read and write operation of the FLASH chip under jurisdiction in the slave configuration mode;
[0007] The update control chip updates the program of the host chip based on the target program firmware data.
[0008] Optionally, further comprising:
[0009] In a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, power supply to the FLASH chip is turned off.
[0010] Optionally, the pcie embedded device further comprises a triode switch, and the power supply to the FLASH chip is turned off by the triode switch in a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode.
[0011] In a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip through the triode switch.
[0012] Optionally, the update command is sent to the update control chip by the upper computer through a network UDP protocol.
[0013] Optionally, the update control chip acquires target program firmware data from the upper computer based on the update command, and the method comprises the following steps.
[0014] The update control chip acquires target program firmware data from the upper computer through network interaction based on the update command through a private protocol.
[0015] In a second aspect, the application further provides a pcie embedded device program updating device, the pcie embedded device comprising a master control chip and an update control chip, and the device comprising:
[0016] A receiving unit is configured to acquire target program firmware data from the upper computer by the update control chip based on an update command in a case where the update control chip receives the update command sent by the upper computer through a remote transmission mode, and the upper computer stores different program firmware data.
[0017] A switching unit is configured to control the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode by the update control chip, and the master control chip stops read-write operation on a FLASH chip under jurisdiction in the slave configuration mode.
[0018] An updating unit is configured to perform program updating on the master control chip by the update control chip based on the target program firmware data.
[0019] In a third aspect, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor configured to implement the steps of the pcie embedded device program updating method of any one of the first aspect when executing the computer program stored in the memory.
[0020] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, the computer program executable by a processor to implement the pcie embedded device program updating method of any one of the first aspect.
[0021] In a fifth aspect, the present application further provides a pcie embedded device including:
[0022] a master control chip, an update control chip, a transistor switch, and a FLASH chip,
[0023] wherein the master control chip is connected to the update control chip and the FLASH chip through the same pin, and the update control chip controls the power supply of the FLASH chip through the transistor switch.
[0024] Optionally, the transistor switch is an ADG819 transistor, the master control chip is an FPGA chip, and the update control chip is a DSP chip or an ARM chip.
[0025] To sum up, the pcie embedded device program updating method provided in the application, when the update control chip receives the update command sent by the upper computer through the remote transmission mode, the update control chip obtains the target program firmware data from the upper computer based on the update command, and the upper computer stores different program firmware data; the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, wherein the master control chip stops the read-write operation of the FLASH chip under jurisdiction in the slave configuration mode; and the update control chip updates the program of the master control chip based on the target program firmware data. It can be understood that the traditional program updating method usually needs to frequently perform the erase-write operation on the FLASH chip, which reduces the service life of the FLASH chip. The present application effectively reduces the erase-write times and prolongs the service life of the FLASH chip by not performing the read-write operation on the FLASH chip during the updating process. The traditional program updating method usually needs to restart the device or suspend the device operation to complete the program updating. The present application switches the master control chip to the slave configuration mode during the updating process to stop the read-write operation of the FLASH chip, avoids interrupting the device operation, and reduces the influence on the normal operation of the device. The program updating under the control of the update control chip can ensure the safety and stability of the updating process. The update control chip can monitor each stage of the updating process and perform corresponding processing when an abnormal situation occurs, so as to ensure the smooth progress of the updating process. The present application supports the remote transmission mode to send the update command, can realize the remote management and updating of the device program, greatly improves the maintainability and management efficiency of the device. No manual on-site operation is needed, time and labor cost are saved, the device downtime is reduced, and the operation efficiency of the device is improved.
[0026] The pcie embedded device program updating device, storage medium, electronic device and pcie embedded device of the application also have the technical effects of the pcie embedded device program updating method described above, and other advantages, objects and features of the application will be embodied in part through the following description and will be understood by those skilled in the art through research and practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0027] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not meant to limit the present application. Moreover, the same reference numerals in the attached drawings indicate the same or similar components. In the drawings:
[0028] Figure 1 A pcie embedded device program updating method flowchart provided by the embodiment of the application;
[0029] Figure 2 A pcie embedded device program updating device structure schematic diagram provided by the embodiment of the application is provided.
[0030] Figure 3 A pcie embedded device program updating electronic device structure schematic diagram provided by the embodiment of the application is provided. DETAILED DESCRIPTION
[0031] The terms "first", "second", "third", "fourth" and the like in the description and claims of the application and in the above summary of the application, if any, are used for distinguishing between similar objects talking about the embodiments of the application and do not necessarily have to appear in the application in this order or in sequence. It is to be understood that the data used in these objects can be interchanged, such that for example the embodiments of the application described herein can be carried out in an order other than the one illustrated or described herein. Furthermore, the terms "comprise" and "have" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units not necessarily limited to those clearly identified as such. The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings of the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, not all the embodiments of the application.
[0032] In order to solve the problem that frequent erasing and writing of the FLASH chip during program updating will reduce its service life, and after updating, the device needs to be reset to run the new function, which will cause inconvenience in some devices that are powered on for a long time, please refer to Figure 1 A pcie embedded device program updating method flowchart provided by the embodiment of the application is provided, the pcie embedded device includes a master control chip and an updating control chip, and specifically can include steps S110 to S130.
[0033] S110, in the case that the updating control chip receives an updating command sent by the host computer through a remote transmission mode, the updating control chip acquires target program firmware data from the host computer based on the updating command, and the host computer stores different program firmware data.
[0034] Exemplarily, the master control chip can be an FPGA chip, and the update control chip can be a DSP chip or an ARM chip. After the device is powered on, the master control chip usually starts the program of the FLASH through a self-starting mode to realize the driving interaction with the host computer. The target program firmware data refers to the binary data of the new program to be updated. According to the update command sent by the host computer, the update control chip selects the required data from different program firmware data stored in the host computer. These data can include program firmware data of different versions or different functions, and the update control chip selects the appropriate data for updating according to the requirement.
[0035] Exemplarily, the update control chip obtains the target program firmware data from the host computer. These data can be stored in the local memory of the host computer, such as a hard disk or a solid state disk, or can be data transmitted through a network.
[0036] S120, the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, wherein the master control chip stops the read-write operation on the FLASH chip under jurisdiction in the slave configuration mode.
[0037] S130, the update control chip updates the program of the master control chip based on the target program firmware data.
[0038] Exemplarily, assuming that the PCIE embedded device is based on an FPGA chip. The host computer communicates with the device through a network and provides a program update function. The update control chip of the device is a DSP chip. In the case that the firmware of the device needs to be updated to a new version. The host computer sends an update command to the update control chip through remote transmission. After receiving the command, the update control chip obtains the target program firmware data from the host computer. These data include the program firmware of the old version and the new version. The update control chip selects the program firmware data of the new version according to the update command. Then, the update control chip transmits the new program firmware data to the FPGA chip for program updating. After the updating is completed, the FPGA chip restarts and starts running with the new program version. Through this process, the program updating of the device is realized without manual intervention or shutdown. The communication between the update control chip and the host computer ensures the safety and stability of the updating process, and improves the maintainability and management efficiency of the device.
[0039] In summary, the pcie embedded device program updating method provided by the embodiments of the present application can be understood as follows: when the update control chip receives an update command sent by the upper computer through a remote transmission mode, the update control chip acquires target program firmware data from the upper computer based on the update command, and the upper computer stores different program firmware data; the update control chip controls the working mode of the master control chip to switch from a master configuration mode to a slave configuration mode, wherein the master control chip stops read-write operations on the FLASH chip under jurisdiction in the slave configuration mode; and the update control chip performs program updating on the master control chip based on the target program firmware data. It can be understood that the traditional program updating method usually needs to frequently perform erase-write operations on the FLASH chip, which reduces the service life of the FLASH chip. However, the present application effectively reduces the erase-write times and prolongs the service life of the FLASH chip by not performing read-write operations on the FLASH chip during the updating process. The traditional program updating method usually needs to restart the device or suspend the device running to complete the program updating. However, the present application switches the master control chip to the slave configuration mode to stop the read-write operations on the FLASH chip during the updating process, thereby avoiding the interruption of the device running and reducing the influence on the normal running of the device. The program updating under the control of the update control chip can ensure the safety and stability of the updating process. The update control chip can be responsible for monitoring each stage of the updating process and performing corresponding processing when an abnormal situation occurs, thereby ensuring the smooth progress of the updating process. The present application supports the remote transmission mode to send the update command, can realize the remote management and updating of the device program, and greatly improves the maintainability and management efficiency of the device. Without manual on-site operation, time and labor costs are saved, and the device downtime is reduced, thereby improving the running efficiency of the device.
[0040] According to some embodiments, further comprising:
[0041] In the case where the update control chip controls the working mode of the master control chip to switch from a master configuration mode to a slave configuration mode, the power supply to the FLASH chip is turned off.
[0042] For example, assume that the main control chip of a PCIE embedded device is an FPGA chip, and the update control chip is a DSP chip. When updating the program, after receiving the update command sent by the host computer, the update control chip controls the working mode of the main control chip to switch from the master configuration mode to the slave configuration mode. During this process, the update control chip can send a signal to the power management module responsible for power supply to request to turn off the power supply to the FLASH chip. In this way, even if the main control chip is in the slave configuration mode, it will not accidentally read and write the FLASH chip, avoiding the influence of the erasing and writing operation on the FLASH chip. After turning off the power supply to the FLASH chip, the update control chip can safely update the program of the main control chip without worrying about the influence on the FLASH chip. By turning off the power supply to the FLASH chip, the safety of the updating process can be further ensured, the influence of the erasing and writing operation on the FLASH chip is avoided, and the success rate and reliability of the program updating are improved.
[0043] According to some embodiments, the PCIE embedded device further comprises a triode switch, and in the case that the update control chip controls the working mode of the main control chip to switch from the master configuration mode to the slave configuration mode, turning off the power supply to the FLASH chip comprises:
[0044] In the case that the update control chip controls the working mode of the main control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip through the triode switch.
[0045] For example, in this device, in addition to the main control chip, the update control chip and the FLASH chip, a triode switch is also included. The function of this triode switch is to control the power supply to the FLASH chip. When the update control chip controls the working mode of the main control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip by controlling the triode switch.
[0046] According to some embodiments, the update command is sent to the update control chip by the host computer through the network UDP protocol.
[0047] Exemplarily, the update command is sent to the update control chip through the network UDP protocol. UDP (User Datagram Protocol) provides a simple data transmission method, unlike TCP, which requires connection establishment. Assuming that the host computer communicates with the update control chip through the network and sends the update command using the UDP protocol. After receiving the UDP data packet, the update control chip parses the update command and performs corresponding operations, such as obtaining target program firmware data, controlling the working mode of the host chip, etc. The connectionless nature of the UDP protocol allows the update command to be quickly sent to the update control chip without the need to establish and maintain a connection, saving communication time and resources. This is very important for program update operations with high real-time requirements. Sending the update command through the UDP protocol also makes the system more flexible, allowing easy communication with different types of host computers and network environments, suitable for various application scenarios. At the same time, the UDP protocol is relatively simple and easy to implement, reducing the development and maintenance costs of the system. In general, sending the update command through the UDP protocol can achieve fast, simple, and flexible program update operations, improving the reliability and real-time performance of the system.
[0048] According to some embodiments, the update control chip obtains target program firmware data from the host computer based on the update command, including:
[0049] The update control chip obtains target program firmware data from the host computer through network interaction based on the update command using a private protocol.
[0050] It can be understood that the private protocol refers to a communication protocol that is not public or customized, usually designed and implemented by the device manufacturer. This protocol may be based on an existing communication protocol such as TCP or UDP, but adds specific data formats, commands and response rules on top of it to meet the communication needs of the device itself. Assuming that the communication between the update control chip and the host computer is based on a private protocol. When the update control chip receives the update command sent by the host computer, it will use the private protocol to establish a connection with the host computer and send a specific request to obtain the target program firmware data. After receiving the request of the update control chip, the host computer prepares the target program firmware data according to the content of the request and sends the data to the update control chip using the private protocol. After receiving the data, the update control chip parses and stores the target program firmware data, and then performs program update operation. The use of private protocols allows devices to communicate flexibly according to their own needs and characteristics, rather than being limited by standard protocols. At the same time, since the design of the private protocol usually takes into account the performance and resource limitations of the device, it can provide more efficient and reliable communication methods. However, the use of private protocols also brings some challenges, such as the need for additional development work, and difficulties in integrating with other devices or systems. Therefore, when designing a private protocol, these factors need to be fully considered to ensure the stability and scalability of communication.
[0051] Please refer to Figure 2 In an embodiment of the pcie embedded device program updating apparatus in the present application, the pcie embedded device includes a master control chip and an update control chip, and the apparatus can include:
[0052] The receiving unit 21 is configured to enable the update control chip to obtain target program firmware data from the host computer based on the update command when the update control chip receives the update command sent by the host computer through remote transmission, and the host computer stores different program firmware data;
[0053] The switching unit 22 is configured to enable the update control chip to control the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, wherein the master control chip stops the read and write operations on the FLASH chip under jurisdiction in the slave configuration mode;
[0054] The updating unit 23 is configured to enable the update control chip to perform program update on the master control chip based on the target program firmware data.
[0055] In conclusion, the pcie embedded device program updating device provided by the embodiment of the present application can be understood as follows: when the update control chip receives an update command sent by the upper computer through a remote transmission mode, the update control chip acquires target program firmware data from the upper computer based on the update command, and the upper computer stores different program firmware data; the update control chip controls the working mode of the master control chip to switch from a master configuration mode to a slave configuration mode, wherein the master control chip stops read and write operations on the FLASH chip under jurisdiction in the slave configuration mode; and the update control chip performs program updating on the master control chip based on the target program firmware data. It can be understood that the traditional program updating mode usually needs to frequently perform erase and write operations on the FLASH chip, which reduces the service life of the FLASH chip. However, the present application effectively reduces the number of erase and write operations and prolongs the service life of the FLASH chip by not performing read and write operations on the FLASH chip during the updating process. The traditional program updating mode usually needs to restart the device or suspend the device operation to complete the program updating. However, the present application switches the master control chip to the slave configuration mode to stop the read and write operations on the FLASH chip during the updating process, avoids interrupting the device operation, and reduces the influence on the normal operation of the device. The program updating under the control of the update control chip can ensure the safety and stability of the updating process. The update control chip can be responsible for monitoring each stage of the updating process and performing corresponding processing when an abnormal situation occurs, so as to ensure the smooth progress of the updating process. The present application supports sending an update command through a remote transmission mode, can realize remote management and updating of the device program, greatly improves the maintainability and management efficiency of the device, does not need manual on-site operation, saves time and labor cost, reduces the downtime of the device, and improves the operation efficiency of the device.
[0056] As shown in Figure 3 The embodiment of the present application also provides an electronic device 300, which comprises a memory 310, a processor 320, and a computer program 311 stored in the memory 320 and capable of running on the processor, and the processor 320 implements the steps of any method for updating the program of the pcie embedded device when executing the computer program 311:
[0057] When the update control chip receives an update command sent by the upper computer through a remote transmission mode, the update control chip acquires target program firmware data from the upper computer based on the update command, and the upper computer stores different program firmware data;
[0058] The update control chip controls the working mode of the master control chip to switch from a master configuration mode to a slave configuration mode, wherein the master control chip stops read and write operations on the FLASH chip under jurisdiction in the slave configuration mode;
[0059] The update control chip updates the master control chip based on the target program firmware data.
[0060] Optionally, the pcie embedded device further comprises:
[0061] In a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the power supply to the FLASH chip is turned off.
[0062] Optionally, the pcie embedded device further comprises: a triode switch, and the in a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the power supply to the FLASH chip is turned off, comprising:
[0063] In a case where the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip through the triode switch.
[0064] Optionally, the update command is sent to the update control chip by the host computer through a network UDP protocol.
[0065] Optionally, the update control chip acquires target program firmware data from the host computer based on the update command, comprising:
[0066] The update control chip acquires target program firmware data from the host computer through network interaction based on the update command through a private protocol.
[0067] Since the electronic device introduced in the embodiment is the device used in the implementation of the pcie embedded device program updating device in the embodiment of the present application, the specific implementation of the electronic device in the embodiment and various changes thereof can be understood by those skilled in the art based on the method introduced in the embodiment of the present application. Therefore, how the electronic device implements the method in the embodiment of the present application is not described in detail, and as long as the device used by those skilled in the art to implement the method in the embodiment of the present application belongs to the scope of the present application.
[0068] In the specific implementation process, the computer program 311 can realize Figure 1 Any implementation of the corresponding embodiment:
[0069] In a case where the update control chip receives an update command sent by the host computer through a remote transmission mode, the update control chip acquires target program firmware data from the host computer based on the update command, and the host computer stores different program firmware data.
[0070] The update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, wherein the master control chip stops read-write operation on the FLASH chip under the slave configuration mode.
[0071] The update control chip updates the program of the master control chip based on the target program firmware data.
[0072] Optionally, the system further comprises:
[0073] In the case that the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the power supply to the FLASH chip is turned off.
[0074] Optionally, the pcie embedded device further comprises a triode switch, and the power supply to the FLASH chip is turned off by the triode switch in the case that the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode.
[0075] In the case that the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip through the triode switch.
[0076] Optionally, the update command is sent to the update control chip by the host computer through the network UDP protocol.
[0077] Optionally, the update control chip acquires the target program firmware data from the host computer based on the update command, comprising:
[0078] The update control chip acquires the target program firmware data from the host computer through network interaction based on the update command through a private protocol.
[0079] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0080] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0081] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0082] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0083] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0084] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0085] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0086] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0087] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0088] It can be understood that the main control chip (FPGA chip) is the core control unit of the device, responsible for processing data and executing programs. By connecting with the update control chip and the FLASH chip, the main control chip can receive instructions sent by the update control chip and exchange data with the FLASH chip as needed. The update control chip (DSP chip or ARM chip) is responsible for controlling the flow and operation of program updates. It is connected with the main control chip and controls the power supply of the FLASH chip through the transistor switch. After receiving the update command from the host computer, the update control chip controls the execution flow of the program and cooperates with the main control chip to complete the program update operation. The transistor switch (ADG819 transistor) is used to control the power supply of the FLASH chip. When the update control chip needs to perform update operation on the FLASH chip, it controls the transistor switch to cut off or connect the power supply of the FLASH chip to ensure the safety and reliability of the update operation. The FLASH chip is used to store the program firmware data of the device. The main control chip can read program data from the FLASH chip, and the update control chip can write new program data to the FLASH chip. By connecting with the main control chip and the update control chip, the FLASH chip can exchange data and communicate with other components of the device. This architecture design makes the device flexible in program update operation and ensures the safety and stability of the update process. By controlling the transistor switch to manage the power supply of the FLASH chip, interference to the FLASH chip during the update process can be effectively avoided, ensuring the successful execution of the update operation.
[0089] In summary, the pcie embedded device provided by the embodiment of the application can, when the update control chip receives an update command sent by the upper computer through remote transmission, obtain target program firmware data from the upper computer based on the update command, and the upper computer stores different program firmware data; the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, wherein the master control chip stops read-write operation on the FLASH chip under jurisdiction in the slave configuration mode; and the update control chip updates the program of the master control chip based on the target program firmware data. It can be understood that the traditional program updating method usually needs to frequently perform erase-write operation on the FLASH chip, which reduces the service life of the FLASH chip. However, the present application effectively reduces the erase-write times and prolongs the service life of the FLASH chip by not performing read-write operation on the FLASH chip during the updating process. The traditional program updating method usually needs to restart the device or suspend the device operation to complete the program updating. However, the present application switches the master control chip to the slave configuration mode to stop the read-write operation on the FLASH chip during the updating process, thereby avoiding interruption of the device operation and reducing the influence on the normal operation of the device. The program updating under the control of the update control chip can ensure the safety and stability of the updating process. The update control chip can be responsible for monitoring each stage of the updating process and performing corresponding processing when an abnormal situation occurs, thereby ensuring the smooth progress of the updating process. The present application supports sending the update command through the remote transmission mode, can realize remote management and updating of the device program, and greatly improves the maintainability and management efficiency of the device. Manual on-site operation is not required, time and labor cost are saved, the device downtime is reduced, and the operation efficiency of the device is improved.
[0090] The embodiment of the application further provides a computer program product, which comprises computer software instructions, and when the computer software instructions run on a processing device, the processing device executes the method as Figure 1 The flow of the pcie embedded device program updating in the corresponding embodiment.
[0091] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that the computer can store or be integrated into a data storage device such as a server, data center, etc. containing one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0093] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0094] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0095] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0096] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and various other media that can store program codes.
[0097] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A PCIE embedded device program update method, characterized in that: The PCIE embedded device includes a main control chip, an update control chip and a transistor switch, the main control chip is a FLASH chip, and the method includes: When the update control chip receives an update command sent by the host computer via remote transmission, the update control chip obtains target program firmware data from the host computer based on the update command, and the host computer stores different program firmware data; The update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode. When the update control chip controls the working mode of the master control chip to switch from the master configuration mode to the slave configuration mode, the update control chip turns off the power supply to the FLASH chip through the transistor switch, so that the master control chip stops the read and write operations on the subordinate FLASH chip in the slave configuration mode; The update control chip updates the program of the main control chip based on the target program firmware data.
2. The method according to claim 1, wherein The update command is sent by the host computer to the update control chip via the network UDP protocol.
3. The method according to claim 1, wherein The update control chip obtains target program firmware data from the host computer based on the update command, including: The update control chip acquires target program firmware data through network interaction from a host computer via a proprietary protocol based on the update command.
4. A PCIE embedded device program update device, characterized in that: According to the method according to any one of claims 1 to 3, the PCIE embedded device includes a main control chip and an update control chip, and the device includes: A receiving unit, configured to enable the update control chip to obtain target program firmware data from the host computer based on the update command when the update control chip receives the update command sent by the host computer via remote transmission, wherein the host computer stores different program firmware data; a switching unit, configured to enable the update control chip to control the working mode of the master control chip to switch from a master configuration mode to a slave configuration mode, wherein in the slave configuration mode, the master control chip stops reading and writing operations on the subordinate FLASH chip; An updating unit is configured to enable the update control chip to perform a program update on the main control chip based on the target program firmware data.
5. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor is used to implement the steps of the PCIE embedded device program update method according to any one of claims 1 to 3 when executing the computer program stored in the memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for updating a PCIE embedded device program according to any one of claims 1 to 3 is implemented.
7. A PCIE embedded device, characterized in that: According to the method according to any one of claims 1 to 3, the device comprises: Main control chip, update control chip, transistor switch and FLASH chip, The main control chip is connected to the update control chip and the FLASH chip respectively through the same pins, and the update control chip controls the power supply of the FLASH chip through the transistor switch.
8. The device according to claim 7, characterized in that The transistor switch is an ADG819 transistor, the main control chip is an FPGA chip, and the update control chip is a DSP chip or an ARM chip.
Citation Information
Patent Citations
Controller with FPGA (Field Programmable Gate Array) chip, operation method of controller and rail transit equipment
CN115542808A