Configuration method and apparatus, electronic device and storage medium
The first processing module sends configuration data to the multiple second processing modules, and solves the problem of insufficient flexibility in configuring multiple programmable devices in the existing system, and realizes rapid update and startup, and improves efficiency.
Patent Information
- Application Number
- PCT/CN2024/121572
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-28
- Filing Date
- 2024-09-26
- Publication Date
- 2025-04-03
AI Technical Summary
When configuring multiple programmable devices, existing systems lack flexibility and cannot update and start multiple devices simultaneously, resulting in inefficiency.
The first processing module sends configuration data to the plurality of second processing modules, so that the corresponding programmable modules are configured. This method does not require on-site operation by technicians and is suitable for large systems.
It realizes rapid configuration data update and startup of multiple programmable modules, improving configuration flexibility and efficiency.
Smart Images

Figure CN2024121572_03042025_PF_FP_ABST
Abstract
Description
Configuration method, device, electronic device, and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application CN202311287309.9, entitled “A configuration method, device, electronic device, and storage medium,” filed on September 28, 2023. The entire contents of that application are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of technical software, and more specifically, to a configuration method, device, electronic device, and storage medium. Background Art
[0004] Programmable devices such as FPGAs (Field Programmable Gate Arrays) are widely used in numerous fields, including communications, security, and industry. With the development of business systems, large systems such as power control systems often have multiple programmable devices. However, in current system architectures, the system can often only update the configuration data and start up one programmable device at a time. Clearly, this approach is no longer suitable for large systems with multiple programmable devices. Improving the configuration flexibility of programmable devices is a technical problem that urgently needs to be solved in this field.
[0005] Summary of the Invention
[0006] In view of the above problems, the embodiments of the present application provide a configuration method, an apparatus, an electronic device, and a storage medium, which can solve the technical problem of how to improve the configuration flexibility of programmable devices.
[0007] In a first aspect, an embodiment of the present application provides a configuration method, which is applied to a first processing module, wherein the first processing module is communicatively connected to a plurality of second processing modules; each of the second processing modules is communicatively connected to a corresponding programmable module; the method comprises:
[0008] Acquire target configuration data of a target programmable module corresponding to a target second processing module among the plurality of second processing modules;
[0009] The target configuration data is sent to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
[0010] In an embodiment of the present application, the target configuration data is sent to the target second processing module via the first processing module, so that the target second processing module can use the target configuration data to configure the target programmable module. On the one hand, after the configuration data is updated, the updated configuration data can be sent to the target second processing module via the first processing module, without the need for technical personnel to go to the site to update. On the other hand, the first processing module can send configuration data to any programmable module via the second processing module without the need to set up additional equipment. Therefore, it is suitable for large systems with multiple programmable modules.
[0011] In some embodiments, the method further includes determining a next target second processing module from the plurality of second processing modules and returning to the step of obtaining target configuration data. The first processing module can configure and activate multiple programmable modules through the plurality of second processing modules. In large systems with multiple programmable modules, the method of this embodiment can be used to rapidly update configuration data for multiple programmable modules and activate multiple programmable modules, thereby improving configuration flexibility and efficiency.
[0012] In some embodiments, before obtaining target configuration data of a target programmable module corresponding to a target second processing module, the method further includes: sending a configuration request carrying a target identifier to a plurality of the second processing modules; wherein the target identifier is an identifier of the target second processing module; and establishing communication with the target second processing module. It can be seen that since the configuration request carries the target identifier, the plurality of second processing modules that receive the configuration request can determine whether they are the target second processing modules based on the target identifier, thereby enabling communication to be established between the first processing module and the target second processing module, and subsequent data exchange can be performed based on the established communication.
[0013] In some embodiments, before sending the configuration request carrying the target identifier to the plurality of second processing modules, the method further includes: obtaining the startup order of the plurality of programmable modules; and generating a configuration request carrying the target identifier based on the startup order, wherein the target identifier is the identifier of the second processing module corresponding to the programmable module in the current sequence. By generating the configuration request based on the startup order of the programmable modules, the first processing module can control the startup order of the plurality of programmable modules, thereby meeting the needs of different scenarios and further improving the flexibility of programmable module startup.
[0014] In some embodiments, different target second processing modules acquire different target configuration data. It can be seen that the first processing module can send different target configuration data to multiple target second processing modules, so that each target programmable module is configured according to different configuration data and can be started in multiple ways, thereby improving the flexibility of programmable module configuration and startup.
[0015] In some embodiments, after sending the target configuration data to the target second processing module, the method further includes: sending verification information of the target configuration data to the target second processing module, so that the target second processing module verifies the target configuration data based on the verification information. The verification information is used to verify whether the target configuration data is lost or tampered with during transmission to verify data integrity, thereby improving the configuration security of the programmable module.
[0016] In some embodiments, the first processing module and the plurality of second processing modules are communicatively connected via a controller area network (CAN) bus. Utilizing the CAN bus to achieve communication between a first processing module and a plurality of second processing modules improves data transmission efficiency, thereby increasing the configurability of the programmable module.
[0017] In some embodiments, the first processing module is integrated into a first board, and each of the second processing modules and the corresponding programmable module is integrated into a second board. By integrating the first processing module into the first board and the plurality of second processing modules and the corresponding programmable modules into the second boards, the first processing module and the plurality of second processing modules communicate with each other through an inter-board connection, thereby achieving communication between the first processing module and the plurality of second processing modules.
[0018] In a second aspect, an embodiment of the present application provides a configuration method applied to a second processing module, wherein the second processing modules include a plurality of modules, each of which is communicatively connected to the first processing module; each of the second processing modules is communicatively connected to a corresponding storage module and a corresponding programmable module; the method includes:
[0019] Retrieving configuration data from the storage module in response to the programmable module being powered on;
[0020] The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module;
[0021] The configuration data is written into the programmable module.
[0022] In the embodiment of the present application, the configuration and startup process of the programmable module is controlled by the second processing module, which can flexibly adjust the startup logic of the programmable module and save the time and cost of starting the programmable module.
[0023] In some embodiments, the second processing module communicates with the programmable module via a serial peripheral interface (SPI); and writing the configuration data into the programmable module includes: the second processing module acts as an SPI host to write the configuration data into the programmable module.
[0024] In some embodiments, writing the configuration data to the programmable module includes writing the configuration data to a register of the programmable module, so that the programmable module obtains the configuration data from the register. It can be seen that the second processing module writes the configuration data to the register of the programmable module, so that the programmable module can read the configuration data from the register for configuration and startup when powered on, without having to read the configuration data from an external memory, thereby improving configuration and startup efficiency.
[0025] In some embodiments, the programmable module is configured in passive mode. The second processing module sends configuration data to the programmable module, which passively receives the configuration data. This allows the second processing module to control the configuration and startup of the programmable module. This eliminates the need for the programmable module to read configuration data from external memory, thereby improving configuration and startup efficiency.
[0026] In some embodiments, the storage module is non-volatile. By selecting non-volatile storage as the storage module, the second processing module can obtain configuration data from the storage module each time the programmable module is powered on, thereby controlling the configuration and startup of the programmable module.
[0027] In some embodiments, before obtaining configuration data from the storage module, the method further includes: receiving a configuration request sent by the first processing module; erasing historical data in the programmable module and / or storage module based on the configuration request; and storing the configuration data received from the first processing module in the storage module. The second processing module erases the historical data in the programmable module and / or storage module, allowing the programmable module to be configured based on the latest configuration data to meet business needs.
[0028] In some embodiments, before storing the configuration data received from the first processing module in the storage module, the method further includes: receiving verification information sent by the first processing module; and determining whether the configuration data passes verification based on the verification information. The verification information is used to verify whether the target configuration data is lost or tampered with during transmission to verify data integrity, thereby improving configuration security of the programmable module.
[0029] In some embodiments, the method further includes returning a transmission result to the first processing module, the transmission result indicating success or failure of the configuration data transmission. The second processing module feeds back the transmission result to the first processing module, so that the first processing module can perform the next operation in response to the transmission result, thereby completing the entire configuration data transmission process.
[0030] In a third aspect, an embodiment of the present application provides a configuration method, which is applied to an electronic device; the electronic device includes a first processing module and a plurality of second processing modules respectively communicatively connected to the first processing module; each second processing module is respectively communicatively connected to a corresponding storage module and a corresponding programmable module; the method includes:
[0031] The first processing module acquires target configuration data of a target programmable module corresponding to a target second processing module among the plurality of second processing modules;
[0032] The first processing module sends the target configuration data to the target second processing module;
[0033] Each of the target second processing modules stores the received target configuration data into a corresponding target storage module;
[0034] In response to the target programmable module being powered on, the target second processing module obtains the target configuration data from the target storage module;
[0035] The target second processing module writes the target configuration data into the target programmable module.
[0036] In a fourth aspect, an embodiment of the present application provides a configuration device, applied to a first processing module, wherein the first processing module is communicatively connected to a plurality of second processing modules; each second processing module is communicatively connected to a corresponding programmable module; the device includes:
[0037] a first acquisition module, configured to acquire target configuration data of a target programmable module corresponding to the target second processing module in a plurality of the second processing modules;
[0038] The sending module is configured to send the target configuration data to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
[0039] In a fifth aspect, an embodiment of the present application provides a configuration device, which is applied to a second processing module, wherein the second processing modules include a plurality of modules, each of which is communicatively connected to the first processing module; each of the second processing modules is communicatively connected to a corresponding storage module and a corresponding programmable module; the device includes:
[0040] a second acquisition module, configured to acquire configuration data from the storage module in response to the programmable module being powered on;
[0041] The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module;
[0042] A writing module is used to write the configuration data into the programmable module.
[0043] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising:
[0044] a first processing module;
[0045] a plurality of second processing modules, respectively connected to the first processing modules for communication;
[0046] A plurality of programmable modules and a plurality of storage modules; wherein each of the second processing modules is respectively communicatively connected with the corresponding storage module and the corresponding programmable module;
[0047] a memory for storing executable instructions of the processing module;
[0048] Wherein, when the first processing module calls the executable instruction, the operation of any method described in the first aspect is implemented;
[0049] When the second processing module calls the executable instruction, the operation of any method described in the second aspect is implemented.
[0050] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of any method described in the first aspect, or any method described in the second aspect, or any method described in the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0052] FIG1 is a schematic diagram of an application scenario of a configuration method provided in an embodiment of the present application;
[0053] FIG2 is a flow chart of a configuration method provided in an embodiment of the present application;
[0054] FIG3 is a flow chart of a communication establishment process in a configuration method provided in an embodiment of the present application;
[0055] FIG4 is a flow chart of a configuration request generation process in a configuration method provided in an embodiment of the present application;
[0056] FIG5 is a flow chart of another configuration method provided in an embodiment of the present application;
[0057] FIG6 is a flow chart of an erasure process in another configuration method provided in an embodiment of the present application;
[0058] FIG7 is a flow chart of a configuration data verification process in another configuration method provided in an embodiment of the present application;
[0059] FIG8 is a flow chart of another configuration method provided in an embodiment of the present application;
[0060] FIG9 is a schematic diagram of an application scenario of a configuration method provided in an embodiment of the present application;
[0061] FIG10 is a flow chart of another configuration method provided in an embodiment of the present application;
[0062] FIG11 is a structural block diagram of a configuration device provided in an embodiment of the present application;
[0063] FIG12 is a structural block diagram of another configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0065] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0066] FPGAs are a further development of programmable devices such as PAL (Programmable Array Logic) and GAL (Generic Array Logic). With technological advancements, large systems, such as those used for power control, often incorporate multiple programmable devices, such as FPGAs.
[0067] Taking FPGA as an example, in the relevant technology, the configuration methods of FPGA mainly include active mode, passive mode and JTAG (Joint Test Action Group) mode. Among them, in active mode and passive mode, the configuration data of FPGA are stored in a memory connected to the FPGA communication. FPGA needs to actively or passively read the configuration data from the memory to complete configuration and startup. However, when the configuration data in the memory needs to be updated, technical personnel are required to go to the site to update it, so this startup method will cause a waste of manpower and time costs. The JTAG mode requires the use of a dedicated FPGA burner and software to write the configuration data into the configuration chip through the JTAG interface. The configuration data cannot be saved after power failure. In addition, the JTAG interface is usually used for research and development and production, and will not be used as an external interface of the product. The device needs to be disassembled for startup, which causes inconvenience.
[0068] It can be seen that the configuration method of FPGA in the related art is not flexible and is not suitable for large systems with multiple programmable devices.
[0069] To this end, embodiments of the present application provide a configuration method for implementing the configuration of a programmable module, such as an FPGA. The following hardware framework is designed for an electronic device: it includes a first processing module and multiple second processing modules communicatively connected thereto, each of which corresponds to a programmable module. During configuration, the first processing module can send target configuration data to any target second processing module among the multiple second processing modules, so that the target second processing module can use the target configuration data to configure the target programmable module.
[0070] In this framework, the first processing module can send configuration data to any programmable module through the second processing module, thereby enabling rapid configuration data updates and startup of any programmable module. This method does not require on-site technical personnel or additional equipment, and can update and configure any programmable module, making it suitable for large systems with multiple programmable modules.
[0071] According to some embodiments of the present application, FIG1 illustrates an application scenario of some embodiments. As shown in FIG1 , a first processing module 101 is communicatively coupled to multiple second processing modules 102. FIG1 illustrates two second processing modules 102. However, the number of second processing modules 102 is not limited to two and can be two or more.
[0072] Each second processing module 102 is in communication with a corresponding programmable module 103. For example, there may be a one-to-one correspondence between the second processing modules 102 and the programmable modules 103. In this way, the number of the second processing modules 102 and the number of the programmable modules 103 are the same.
[0073] Exemplarily, the first processing module 101 , the first processing module 101 and the programmable module 103 may be hardware modules or software modules.
[0074] Illustratively, the first processing module 101 and the second processing module 102 may be similar or identical processing modules, or may be different processing modules.
[0075] Optionally, the first processing module 101 may be a CPU (Central Processing Unit). Of course, in addition to the CPU, the first processing module 101 may also be any other processing module with data processing capabilities that can implement the functions of the first processing module described below, including but not limited to an SOC (System on Chip) and an xPU (x-Processing Unit).
[0076] Optionally, the second processing module 102 may be an MCU (Microcontroller Unit). Of course, in addition to an MCU, the second processing module 102 may also be any other processing module with configuration capabilities that can implement the functions of the second processing module described below, such as, but not limited to, an SOC, an xPU, and the like.
[0077] Optionally, the programmable module 103 may be an FPGA. Of course, in addition to the FPGA, the programmable module 103 may also be any other module with programmable functions that can implement the functions of the programmable module described below.
[0078] Of course, in addition to the above examples, the specific implementation of the first processing module 101, the second processing module 102, or the programmable module 103 can be selected by those skilled in the art according to actual needs. Any module that can implement the functions described in the following embodiments can be used as the first processing module 101, the second processing module 102, or the programmable module 103 in this embodiment.
[0079] In some embodiments, each second processing module 102 may be communicatively connected to a corresponding programmable module 103 and may also be communicatively connected to a corresponding storage module 104 .
[0080] For example, the second processing modules 102 and the storage modules 104 may correspond one to one. In this way, the number of the second processing modules 102 and the storage modules 104 are the same. That is, the number of the second processing modules 102, the programmable modules 103 and the storage modules 104 are the same.
[0081] Exemplarily, the storage module 104 may be a hardware module or a software module.
[0082] Optionally, the storage module 104 may be a non-volatile storage, for example including but not limited to a Flash memory.
[0083] Optionally, the connection 105 between the first processing module 101 and the plurality of second processing modules 102 is a wired connection.
[0084] Optionally, the connection 106 between the second processing module 102 and the programmable module 103 is a wired connection.
[0085] According to some embodiments of the present application, a first aspect provides a configuration method, which is applied to the first processing module 101 shown in Figure 1. That is, the first processing module 101 serves as the method execution subject of this embodiment. Figure 2 shows a flow diagram of a configuration method, including steps 210 to 220.
[0086] Step 210: Obtain target configuration data of a target programmable module corresponding to a target second processing module among the plurality of second processing modules;
[0087] Step 220: Send the target configuration data to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
[0088] The target second processing module may be any one or more of the plurality of second processing modules. Since each second processing module corresponds to a programmable module, the target programmable module is the programmable module corresponding to the target second processing module.
[0089] The target configuration data is used to configure the target programmable module. After the first processing module obtains the target configuration data and sends it to the target second processing module, the target second processing module can use the obtained target configuration data to configure the target programmable module. After being configured, the target programmable module can be started.
[0090] As an example, a programmable module for executing a service can be determined as a target programmable module based on service requirements, and its corresponding second processing module can be determined as a target second processing module. In this way, the first processing module sends target configuration data to the target second processing module, so that after the target second processing module configures the target programmable module using the target configuration data, the target programmable module starts and executes the corresponding service to meet the service requirements.
[0091] As an example, it is possible to determine that an unconfigured programmable module is a target programmable module, and its corresponding second processing module is a target second processing module. That is, the target programmable module corresponding to the target second processing module has no configuration history. For example, if a new programmable module and a corresponding second processing module are added, then the new programmable module has not been configured, and no corresponding configuration data exists. In this way, the new programmable module can be determined as the target programmable module, and its corresponding second processing module is the target second processing module. By sending the target configuration data to the target second processing module through the first processing module, the configuration operation of the new programmable module can be completed.
[0092] As an example, the programmable module corresponding to the updated configuration data can be determined as the target programmable module, and its corresponding second processing module can be determined as the target second processing module. In this way, the first processing module sends the target configuration data to the target second processing module, thereby completing the operation of updating the configuration of the target programmable module.
[0093] In this embodiment, the first processing module sends target configuration data to the target second processing module, allowing the target second processing module to use the target configuration data to configure the target programmable module. On one hand, after the configuration data is updated, the updated configuration data can be sent to the target second processing module through the first processing module, eliminating the need for on-site technical personnel to perform the update. On the other hand, the first processing module can send configuration data to any programmable module through the second processing module without the need for additional equipment, making it suitable for large systems with multiple programmable modules.
[0094] Based on the above embodiment, the above method may further include the steps of:
[0095] The next target second processing module is determined from the plurality of second processing modules, and the step of obtaining target configuration data is returned to be executed.
[0096] The target second processing modules may include a plurality of them. For example, at least some of the second processing modules may be determined as the target second processing modules.
[0097] For each target second processing module, the first processing module may perform steps 210 to 220 on it. That is, for each target second processing module, after obtaining the target configuration data of its corresponding target programmable module and sending it to the target second processing module, the first processing module performs the same processing on the next target second processing module.
[0098] Illustratively, the first processing module may determine a next target second processing module from a plurality of second processing modules.
[0099] It can be seen that, in the case where there are multiple target second processing modules, the first processing module executes step 210 to step 220 in a loop until all target second processing modules obtain corresponding target configuration data.
[0100] Optionally, after the first processing module completes executing steps 210 to 220 on the current target second processing module, it directly executes steps 210 to 220 on the next target second processing module.
[0101] Optionally, after the first processing module completes executing steps 210 to 220 on the current target second processing module, it executes steps 210 to 220 on the next target second processing module when a preset condition is met.
[0102] Optionally, the preset condition may include: receiving a sending result returned by the target second processing module, wherein the sending result is used to indicate whether the first processing module succeeds or fails in sending the configuration data to the target second processing module.
[0103] That is, after the first processing module completes executing steps 210 to 220 for the current target second processing module, upon receiving the result returned by the current target second processing module, it executes steps 210 to 220 for the next target second processing module.
[0104] Optionally, the preset condition may include: receiving a sending result returned by the target second processing module, indicating that the configuration data has been sent successfully.
[0105] That is, after the first processing module completes execution of steps 210-220 on the current target second processing module, upon receiving the sending result returned by the current target second processing module, and the sending result indicates that the first processing module has successfully sent the configuration data to the target second processing module, steps 210-220 are executed on the next target second processing module.
[0106] If the sending result indicates that the first processing module failed to send the configuration data to the target second processing module, the first processing module can re-execute steps 210-220 on the current target second processing module until a sending result indicating success is received, or the number of executions on the same target second processing module exceeds a preset threshold.
[0107] In this embodiment, the first processing module can configure and activate multiple programmable modules through multiple second processing modules. For large systems with multiple programmable modules, the method of this embodiment can be used to quickly update the configuration data of multiple programmable modules and activate multiple programmable modules, thereby improving configuration flexibility and efficiency.
[0108] Based on the above embodiment, before executing step 210 to obtain the target configuration data, the method may further include steps 310 to 320 as shown in FIG. 3 .
[0109] Step 310: Sending a configuration request carrying a target identifier to multiple second processing modules;
[0110] Wherein, the target identifier is the identifier of the target second processing module;
[0111] Step 320: Establish communication with the target second processing module.
[0112] The configuration request is used to request the target second processing module to receive target configuration data.
[0113] The first processing module may send a configuration request to multiple second processing modules. The multiple second processing modules may be all second processing modules that are communicatively connected to the first processing module, or may be some of the second processing modules. The configuration request may be sent to only the target second processing modules.
[0114] The configuration request carries a target identifier, that is, an identifier of the target second processing module. Exemplarily, each second processing module has an identifier for uniquely identifying the identity of the second processing module. For example, the identifier can be a unique identifier such as a number or a name.
[0115] Of course, the target identifier may also be the identifier of the target programmable module. Exemplarily, the identifiers of each second processing module and its corresponding programmable module may be set to be consistent.
[0116] Optionally, the first processing module may obtain target configuration data according to the target identifier.
[0117] Because the configuration request carries a target identifier, each second processing module, upon receiving the configuration request, can determine based on the target identifier whether it is the target second processing module. If so, it can establish communication with the first processing module; if not, it ignores the configuration request.
[0118] Exemplarily, establishing communication between the first processing module and the target second processing module may include receiving a communication address returned by the target second processing module. Specifically, if a second processing module determines that it is the target second processing module based on the target identifier, it returns its communication address to the first processing module. The first processing module may then send other data, such as target configuration data, based on the communication address.
[0119] In this embodiment, since the configuration request carries a target identifier, the multiple second processing modules that receive the configuration request can determine whether they are the target second processing modules based on the target identifier, so that communication can be established between the first processing module and the target second processing module, and subsequent data interaction can be carried out based on the established communication.
[0120] Based on the above embodiment, before executing step 310 to send the configuration request to the plurality of second processing modules, the method may further include steps 410 to 420 as shown in FIG. 4 .
[0121] Step 410: Obtaining a startup sequence of the plurality of programmable modules;
[0122] Step 420: Generate a configuration request carrying a target identifier according to the startup sequence; the target identifier is the identifier of the second processing module corresponding to the programmable module in the current sequence.
[0123] The startup sequence refers to the order in which at least some of the multiple programmable modules are started up at a particular startup. For a system with multiple programmable modules, it may be necessary to start up multiple programmable modules in some scenarios. In some scenarios, it may also be required that multiple programmable modules be started up in a certain order. The startup sequence of the programmable modules can be the same or different in different scenarios or at different startups. The startup sequence of the programmable modules can be set by technicians according to actual needs and is not limited by this application.
[0124] In this way, the first processing module can first obtain the startup sequence of multiple programmable modules, and determine the programmable module and its corresponding second processing module in the current sequence according to the startup sequence. It can be seen that the programmable module is the target programmable module in the current sequence, and the second processing module is the target second processing module in the current sequence. The identifier of the target second processing module is the target identifier, so a configuration request carrying the target identifier can be generated.
[0125] If multiple target second processing modules receive configuration requests in sequence according to the startup order, they will also receive target configuration data in sequence according to the startup order, and use the target configuration data to configure the target programmable modules in sequence. Therefore, each target programmable module can be started in sequence according to the startup order.
[0126] In this embodiment, by generating configuration requests according to the startup sequence of the programmable modules, the first processing module can control the startup sequence of multiple programmable modules, which can meet the needs of different scenarios and further improve the flexibility of programmable module startup.
[0127] Based on any of the above embodiments, in the case of including multiple target second processing modules, different target second processing modules obtain different target configuration data.
[0128] That is, the first processing module can obtain different target configuration data and send them to different target second processing modules. Each target second processing module uses its own target configuration data to configure its own target programmable module. Different target programmable modules correspond to different target configuration data. Under different configurations, each target programmable module is started in a variety of ways.
[0129] Of course, in some embodiments, the target configuration data acquired by different target second processing modules may be the same.
[0130] That is, the first processing module can obtain the same target configuration data and send it to multiple different target second processing modules respectively, so that each target second processing module uses the same target configuration data to configure each target programmable module. Different target programmable modules correspond to the same target configuration data. Under the same configuration, each target programmable module is started in the same way.
[0131] In this embodiment, the first processing module can send different target configuration data to multiple target second processing modules, so that each target programmable module is configured according to different configuration data and thus started in multiple ways, thereby improving the flexibility of programmable module configuration and startup.
[0132] Based on any of the above embodiments, after executing step 220 to send the target configuration data to the target second processing module, the method may further include the steps of:
[0133] Verification information of the target configuration data is sent to the target second processing module, so that the target second processing module verifies the target configuration data based on the verification information.
[0134] The verification information is used to verify whether the target configuration data is complete and has not been tampered with during the transmission process.
[0135] For example, the first processing module can generate verification information based on the target configuration data using a verification algorithm and send the verification information to the target second processing module. The target second processing module can generate verification information based on the received target configuration data using the same verification algorithm. By determining whether the generated verification information is consistent with the received verification information, it is determined whether the target configuration data is intact and has not been tampered with during the transmission process.
[0136] Illustratively, the verification information may be generated as needed using methods in related technologies, such as but not limited to a CRC (Cyclic Redundancy Check) verification method.
[0137] Optionally, before sending the target configuration data to the target second processing module, the first processing module may first send a transmission start command carrying target configuration data length information to the target second processing module.
[0138] In this way, the target second processing module can determine whether the target configuration data has been completely transmitted according to the length information.
[0139] Optionally, the target configuration data can be sent to the target second processing module in its entirety all at once. Alternatively, the target configuration data can be sent to the target second processing module in batches, depending on the amount of data to be transmitted. In this way, the target second processing module can determine whether the batch transmission is complete based on the length information in the transmission start command.
[0140] Optionally, after determining that the target configuration data transmission is completed according to the length information, the target second processing module may return a transmission response message to the first processing module. In response to the transmission response message, the first processing module sends a transmission end command carrying verification information to the target second processing module.
[0141] In this embodiment, the target configuration data is checked by checking information to see whether it is lost or tampered with during transmission, so as to verify the integrity of the data, thereby improving the configuration security of the programmable module.
[0142] Based on any of the above embodiments, the first processing module and the plurality of second processing modules are communicatively connected via a Controller Area Network (CAN) bus.
[0143] That is, the connection 105 between the first processing module 101 and the plurality of second processing modules 102 as shown in FIG1 is a CAN bus.
[0144] The CAN bus is a serial communication protocol bus designed for real-time applications. It uses twisted-pair cables to transmit signals and is one of the most widely used fieldbuses in the world. Features of the CAN protocol include complete serial data communication, real-time support, a transmission rate of up to 1Mb / s, 11-bit addressing, and error detection. The CAN bus can connect a large number of devices; theoretically, a single CAN bus can connect up to 110 nodes, and data transmission distances can reach up to 10 kilometers.
[0145] Since a plurality of nodes can be connected to the CAN bus, the communication connection between a first processing module and a plurality of second processing modules can be realized by using the CAN bus.
[0146] Of course, in addition to the CAN bus, other wired connections in the related art that can connect multiple nodes on a bus can also be used as embodiments of the connection 105 in Figure 1. The connection 105 between the first processing module 101 and the multiple second processing modules 102 is not limited to the implementation of the CAN bus.
[0147] In this embodiment, the CAN bus is used to realize the communication connection between a first processing module and a plurality of second processing modules, while also improving the data transmission efficiency, thereby improving the configurability efficiency of the programmable module.
[0148] Based on any of the above embodiments, the first processing module 101, multiple second processing modules 102, and multiple programmable modules 103 shown in FIG1 can be installed in an electronic device. The first processing module 101 is integrated into a first board; each second processing module 102 and its corresponding programmable module 103 can be integrated into a second board.
[0149] Optionally, each second processing module 102 is further connected to a corresponding storage module 104. Thus, the second board also integrates the storage module 104 corresponding to the second processing module 102.
[0150] Exemplarily, the second board includes a plurality of boards, each of which integrates a second processing module 102 and its corresponding programmable module 103 and storage module 104. The first board is communicatively connected to the second board and is mounted in the same electronic device.
[0151] In this embodiment, by integrating the first processing module into the first board, multiple second processing modules and corresponding programmable modules into the second board respectively, the first processing module and the multiple second processing modules communicate with each other through the connection between the boards, thereby realizing the communication connection between the first processing module and the multiple second processing modules.
[0152] According to some embodiments of the present application, a second aspect provides a configuration method, which is applied to the second processing module 102 shown in Figure 1. That is, the second processing module 102 serves as the method execution subject of this embodiment. Figure 5 shows a flowchart of a configuration method, including steps 510 to 520.
[0153] Step 510: In response to the programmable module being powered on, obtaining configuration data from the storage module;
[0154] The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module;
[0155] Step 520: Write the configuration data into the programmable module.
[0156] After the first processing module sends the configuration data to the second processing module, for example, the target second processing module described in any of the above embodiments, the second processing module may store the received configuration data in the storage module.
[0157] When the programmable module is powered on and needs to be started, the second processing module obtains the configuration data from the storage module and writes it into the programmable module to configure the programmable module. After the configuration is completed, the programmable module can be started, thus completing the startup process.
[0158] In this embodiment, the configuration and startup process of the programmable module is controlled by the second processing module, which can flexibly adjust the startup logic of the programmable module and save the time and cost of starting the programmable module.
[0159] Based on the above embodiment, the second processing module communicates with the programmable module via a serial peripheral interface (SPI). Thus, writing the configuration data into the programmable module in step 520 may include:
[0160] The second processing module acts as an SPI host to write the configuration data into the programmable module.
[0161] The second processing module and the programmable module communicate via SPI, that is, the connection 106 between the second processing module 102 and the programmable module 103 shown in FIG1 is SPI communication.
[0162] SPI is a synchronous serial communication protocol that provides high-speed, full-duplex communication. SPI is a master-slave protocol that provides a simple and low-cost interface between a master and slave device. In this embodiment, the second processing module, acting as an SPI master, can write configuration data to the programmable module, acting as an SPI slave. This allows the programmable module to be configured based on the configuration data and boot up.
[0163] Of course, in addition to SPI communication, those skilled in the art can also select a communication method between the second processing module and the programmable module according to actual needs. The communication method can enable the second processing module to send configuration data to the programmable module.
[0164] Based on the above embodiment, writing the configuration data into the programmable module in step 520 may include:
[0165] The configuration data is written into a register of the programmable module, so that the programmable module obtains the configuration data from the register.
[0166] The programmable module includes registers that can be used to store other data, such as configuration data. When the second processing module writes configuration data into the programmable module, the configuration data is stored in the registers. The programmable module then reads the configuration data from the registers for configuration and startup.
[0167] In this embodiment, the second processing module writes the configuration data into the register of the programmable module, so that the programmable module can read the configuration data from the register for configuration and startup when powered on, without having to read the configuration data from an external memory, thereby speeding up the configuration efficiency and startup efficiency.
[0168] Based on the above embodiment, the programmable module is set to passive mode.
[0169] In this embodiment, the second processing module sends configuration data to the programmable module, which passively receives the configuration data. This allows the second processing module to control the configuration and startup of the programmable module. This eliminates the need for the programmable module to read configuration data from external memory, thereby improving configuration and startup efficiency.
[0170] Based on the above embodiment, the storage module is non-volatile.
[0171] The storage module is used to store configuration data. Whenever the programmable module is powered on, the second processing module reads the configuration data from the storage module and writes it to the programmable module. To ensure that the configuration data in the storage module is not lost after the device is powered off, the storage module can utilize non-volatile storage, such as, but not limited to, Flash storage.
[0172] In this embodiment, non-volatile storage is selected as the storage module, so that the second processing module can obtain configuration data from the storage module each time the programmable module is powered on, thereby controlling the configuration and startup of the programmable module.
[0173] Based on the above embodiment, before executing step 510 of acquiring configuration data from the storage module, the method may further include steps 610 to 630 as shown in FIG. 6 .
[0174] Step 610: Receive a configuration request sent by the first processing module;
[0175] Step 620: Erasing historical data in the programmable module and / or storage module based on the configuration request;
[0176] Step 630: Store the configuration data received from the first processing module in the storage module.
[0177] The configuration request is used to request the second processing module to receive configuration data. When the second processing module receives the configuration request, it indicates that the first processing module is about to send configuration data.
[0178] Since the programmable module is usually configured based on a set of configuration data, the second processing module may erase historical data in the programmable module and / or storage module before receiving the configuration data. The so-called historical data refers to historical configuration data.
[0179] After erasing the historical data, the new configuration data received from the first processing module is stored in the storage module.
[0180] Optionally, the configuration request may carry a target identifier. When the second processing module determines that it is the request object of the configuration request according to the target identifier, it executes step 620 to erase the historical data.
[0181] Optionally, after erasing historical data in step 620, the second processing module may return configuration response information to the first processing module. In response to the configuration response information, the first processing module may start sending configuration data to the second processing module, for example, the target second processing module.
[0182] Optionally, the configuration response information may carry the communication address of the second processing module, so that the first processing module can send configuration data and other data based on the communication address.
[0183] In this embodiment, the second processing module erases historical data in the programmable module and / or the storage module, so that the programmable module is configured based on the latest configuration data to meet business needs.
[0184] Based on the above embodiment, before executing 630 to store the configuration data in the storage module, the method may further include steps 710 to 720 shown in FIG. 7 .
[0185] Step 710: Receive verification information sent by the first processing module;
[0186] Step 720: Determine whether the configuration data passes the verification based on the verification information.
[0187] The verification information is used to verify whether the target configuration data is complete and has not been tampered with during the transmission process.
[0188] Exemplarily, the first processing module can use a verification algorithm to generate verification information based on the configuration data sent to the second processing module, and send the verification information to the second processing module. The second processing module can use the same verification algorithm to generate verification information based on the received configuration data. Subsequently, by comparing the received verification information with the generated verification information to determine whether they are consistent, it is determined whether the configuration data is complete and has not been tampered with during the transmission process. Exemplarily, the verification algorithm used can be a CRC check.
[0189] In this embodiment, the target configuration data is checked by checking information to see whether it is lost or tampered with during transmission, so as to verify the integrity of the data, thereby improving the configuration security of the programmable module.
[0190] Based on the above embodiment, the method may further include the steps of:
[0191] A sending result is returned to the first processing module, where the sending result is used to indicate whether the configuration data is sent successfully or failed.
[0192] Optionally, the sending result may be returned to the first processing module after the second processing module completes receiving the configuration data.
[0193] Optionally, the sending result may be returned to the first processing module after the second processing module determines that the configuration data passes verification.
[0194] After the sending result is returned, the process of sending the configuration data from the first processing module to the second processing module is completed.
[0195] In this embodiment, the second processing module feeds back the sending result to the first processing module, so that the first processing module can perform the next operation in response to the sending result, thereby completing the entire configuration data sending process.
[0196] According to some embodiments of the present application, a third aspect provides a configuration method for an electronic device. As shown in FIG1 , the electronic device includes a first processing module 101 and multiple second processing modules 102, each of which is communicatively connected to the first processing module 101. Each second processing module 102 is communicatively connected to a corresponding storage module 104 and a corresponding programmable module 103. The method includes steps 810 to 850, as shown in FIG8 .
[0197] Step 810: The first processing module obtains target configuration data of a target programmable module corresponding to a target second processing module among the plurality of second processing modules;
[0198] Step 820: The first processing module sends the target configuration data to the target second processing module;
[0199] Step 830: Each of the target second processing modules stores the received target configuration data into the corresponding target storage module;
[0200] Step 840: In response to the target programmable module being powered on, the target second processing module obtains the target configuration data from the target storage module;
[0201] Step 850: The target second processing module writes the target configuration data into the target programmable module.
[0202] The specific process of implementing the above steps is detailed in the implementation process of any of the above embodiments and will not be repeated here.
[0203] In this embodiment, the first processing module sends configuration data for each programmable module to the second processing module, which then controls the configuration and startup of the programmable modules. This allows updated configuration data to be sent to the target second processing module via the first processing module, eliminating the need for on-site technicians to perform updates. Furthermore, the first processing module can send configuration data to any programmable module through the second processing module, eliminating the need for additional equipment. This makes it suitable for large systems with multiple programmable modules.
[0204] According to some embodiments of the present application, an electronic device as shown in FIG. 9 and a configuration method as shown in FIG. 10 are also provided.
[0205] 9 , an electronic device 900 includes a CPU 901 and N MCUs 902 , where N is a positive integer greater than 1. The CPU 901 and the MCUs 902 are connected to each other via a CAN bus.
[0206] Each MCU 902 is connected to a corresponding FPGA 903 and a corresponding Flash memory 904. The number of MCUs 902, FPGAs 903, and Flash memories 904 is not N. The MCUs 902 and FPGAs 903 are connected to each other via an SPI bus.
[0207] The CPU 901 is integrated into the first board. The number of the first board is 1. The MCU 901 and its corresponding FPGA 903 and Flash memory 904 are integrated into the second board. The number of the second board is N.
[0208] 10 , the CPU 901 first sends a configuration request t1 to the MCU 902 (step 1001 ).
[0209] Optionally, configuration request t1 carries the FPGA 903 number (e.g., number 1, number 2, ..., or number N) and the name of the configuration data. The FPGA 903 number serves as a target identifier. CPU 901 can obtain the corresponding configuration data based on the name of the configuration data. Furthermore, CPU 901 can send configuration request t1 to multiple MCUs 902. Because configuration request t1 carries the target identifier, each MCU 902 can determine whether it is the target of configuration request t1 based on the target identifier.
[0210] If not, the configuration request is ignored. If so, the historical data in the corresponding FPGA 903 and / or the corresponding Flash memory 904 is erased (step 1002), and a configuration response message r1 is returned to the CPU 901 (step 1003). The configuration response message r1 may carry the communication address of the module, so that the CPU 901 establishes a communication connection with the MCU 902 based on the communication address and transmits and receives data based on the communication address.
[0211] In response to the configuration response message r1, the CPU 901 sends a transfer start command t2 to the MCU 902 (step 1004). The transfer start command t2 may include the length of the configuration data. Subsequently, the CPU 901 sends a data transfer command t3 to the MCU 902 (step 1005). The data transfer command t3 includes at least a portion of the configuration data. In response to the data transfer command t3, the MCU 902 stores the configuration data included in the data transfer command t3 in the Flash memory 904 (step 1006).
[0212] If the data transmission command t3 carries all the configuration data, steps 1005 and 1006 are executed once. If the data transmission command t3 carries partial configuration data, steps 1005 and 1006 are executed repeatedly until all the configuration data is sent to the MCU 902. In other words, the configuration data can be sent to the MCU 902 in batches using the data transmission command t3.
[0213] The MCU 902 can determine whether the configuration data has been transmitted based on the length information in the transmission start command t2. If so, the MCU 902 sends a transmission response message r2 to the CPU 901 (step 1007).
[0214] In response to the transmission response information r2, CPU901 can send a transmission end command t4 to MCU902 (step 1008). The transmission end command t4 can carry a CRC check code. MCU902 can use the CRC check code to perform a CRC check on the received configuration data (step 1009). And based on the check result, return the sending result r3 to CPU901 (step 1010). The sending result r3 is used to indicate whether the configuration data is sent successfully or failed. Exemplarily, if the configuration data verification passes, it is determined that the configuration data is sent successfully, and the returned sending result r3 indicates success; if the configuration data verification fails, it is determined that the configuration data is sent unsuccessfully, and the returned sending result r3 indicates failure.
[0215] If the sending result r3 indicates failure, the CPU 901 may re-execute the configuration data sending process of steps 1001 to 1010 on the current MCU 902 .
[0216] If there are multiple MCUs 902 to which configuration data needs to be sent, after the configuration data sending process of steps 1001 to 1010 is completed for the current MCU 902 and the sending result r3 indicates success, the configuration data sending process of steps 1001 to 1010 is executed for the next MCU 902 .
[0217] If the FPGAs 903 need to be started in a certain startup sequence, the CPU 901 can sequentially determine the MCUs 902 in the current startup sequence. After completing the configuration data transmission process of steps 1001 to 1010 for the MCU 902 in the current startup sequence, and if the transmission result r3 indicates success, the CPU 901 determines the next MCU 902 in the startup sequence. The configuration data transmission process of steps 1001 to 1010 is repeated until all FPGAs 903 are started in the specified startup sequence.
[0218] After successfully receiving the configuration data, MCU902 responds to FPGA103 powering on. MCU902 acts as an SPI master and writes the configuration file to FPGA103 via the SPI bus in FPGA103's passive mode, so that FPGA103 is configured using the configuration data. After the configuration is completed, FPGA103 starts.
[0219] According to some embodiments of the present application, a fourth aspect further provides a configuration device, which is applied to a first processing module. The first processing module is communicatively connected to a plurality of second processing modules; each second processing module is communicatively connected to a corresponding programmable module. As shown in FIG11 , the configuration device 1100 includes:
[0220] A first acquiring module 1110 is configured to acquire target configuration data of a target programmable module corresponding to the target second processing module in the plurality of second processing modules;
[0221] The sending module 1120 is configured to send the target configuration data to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
[0222] In some embodiments, the configuration apparatus 1100 further includes:
[0223] The determination module is used to determine the next target second processing module from the plurality of second processing modules and return the result to the first acquisition module 1110 .
[0224] In some embodiments, the configuration apparatus 1100 further includes:
[0225] A configuration request module, configured to send a configuration request carrying a target identifier to a plurality of the second processing modules; wherein the target identifier is an identifier of the target second processing module;
[0226] A communication module is used to establish communication with the target second processing module.
[0227] In some embodiments, the configuration apparatus 1100 further includes:
[0228] A startup sequence module, used to obtain the startup sequence of the plurality of programmable modules;
[0229] A generating module is used to generate a configuration request carrying a target identifier according to the startup sequence; the target identifier is an identifier of the second processing module corresponding to the programmable module in the current sequence.
[0230] In some embodiments, the target configuration data acquired by different target second processing modules are different or the same.
[0231] In some embodiments, the configuration apparatus 1100 further includes:
[0232] The verification information module sends the verification information of the target configuration data to the target second processing module, so that the target second processing module verifies the target configuration data based on the verification information.
[0233] In some embodiments, the first processing module is communicatively connected to the plurality of second processing modules via a controller area network (CAN) bus.
[0234] In some embodiments, the first processing module is integrated into a first board; each of the second processing modules and the corresponding programmable module are integrated into a second board.
[0235] According to some embodiments of the present application, a fifth aspect further provides a configuration device, which is applied to a second processing module. The second processing modules include multiple modules, each of which is communicatively connected to the first processing module; each of the second processing modules is communicatively connected to a corresponding storage module and a corresponding programmable module. As shown in Figure 12, the configuration device 1200 includes:
[0236] A second acquisition module 1210 is configured to acquire configuration data from the storage module in response to the programmable module being powered on;
[0237] The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module;
[0238] The writing module 1220 is configured to write the configuration data into the programmable module.
[0239] In some embodiments, the second processing module communicates with the programmable module via a serial peripheral interface (SPI); the writing module 1220 is specifically configured to:
[0240] The second processing module acts as an SPI host to write the configuration data into the programmable module.
[0241] In some embodiments, the writing module 1220 is specifically configured to write the configuration data into a register of the programmable module, so that the programmable module obtains the configuration data from the register.
[0242] In some embodiments, the programmable module is set to passive mode.
[0243] In some embodiments, the storage module is non-volatile.
[0244] In some embodiments, the configuration device 1200 further includes:
[0245] a receiving module, configured to receive the configuration request sent by the first processing module;
[0246] an erasing module, configured to erase historical data in the programmable module and / or storage module based on the configuration request;
[0247] The storage module is configured to store the configuration data received from the first processing module in the storage module.
[0248] In some embodiments, the configuration device 1200 further includes:
[0249] A receiving module, configured to receive the verification information sent by the first processing module;
[0250] A verification module is used to determine whether the configuration data passes the verification based on the verification information.
[0251] In some embodiments, the configuration device 1200 further includes:
[0252] The sending result module is used to return a sending result to the first processing module, where the sending result is used to indicate whether the configuration data is sent successfully or failed.
[0253] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0254] Based on the method described in any of the above embodiments, the present application also provides a structural diagram of an electronic device as shown in Figure 1. As shown in Figure 1, at the hardware level, the electronic device includes a first processing module; multiple second processing modules, each of which is in communication with the first processing module; multiple programmable modules and multiple storage modules; wherein each second processing module is in communication with the corresponding storage module and the corresponding programmable module; a memory for storing executable instructions of the processing module; wherein, when the first processing module calls the executable instructions, the operation of the method described in any of the above embodiments is implemented; and when the second processing module calls the executable instructions, the operation of the method described in any of the above embodiments is implemented.
[0255] Of course, the electronic device may also include hardware required for other services such as an internal bus, a network interface, etc. The memory may include one or more memories, and the one or more memories are used to store executable instructions of the first processing module and the second processing module.
[0256] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute a configuration method described in any of the above embodiments.
[0257] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0258] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0259] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, 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 enabling 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 method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0260] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
[0261] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0262] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. A configuration method, applied to a first processing module, wherein the first processing module is communicatively connected with a plurality of second processing modules; Each of the second processing modules is respectively connected to a corresponding programmable module for communication; the method comprises: Acquire target configuration data of a target programmable module corresponding to a target second processing module among the plurality of the second processing modules; The target configuration data is sent to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
2. The method according to claim 1, wherein: The method further comprises: The next target second processing module is determined from the plurality of the second processing modules, and the step of obtaining target configuration data is returned to be executed.
3. The method according to claim 1 or 2, wherein: Before acquiring the target configuration data of the target programmable module corresponding to the target second processing module, the method further includes: Sending a configuration request carrying a target identifier to a plurality of the second processing modules; wherein the target identifier is an identifier of the target second processing module; Establishing communication with the target second processing module.
4. The method according to claim 3, wherein: Before sending the configuration request carrying the target identifier to the plurality of second processing modules, the method further includes: Obtaining a startup sequence of the plurality of programmable modules; According to the startup sequence, a configuration request carrying a target identifier is generated; the target identifier is an identifier of a second processing module corresponding to the programmable module in the current sequence.
5. The method according to any one of claims 2 to 4, wherein: The target configuration data acquired by the second processing modules for different targets are different.
6. The method according to any one of claims 1 to 5, wherein: After sending the target configuration data to the target second processing module, the method further includes: The verification information of the target configuration data is sent to the target second processing module, so that the target second processing module verifies the target configuration data based on the verification information.
7. The method according to any one of claims 1 to 6, wherein: The first processing module is communicatively connected with the plurality of the second processing modules via a controller area network (CAN) bus.
8. The method according to any one of claims 1 to 7, wherein: The first processing module is integrated into a first board; each of the second processing modules and the corresponding programmable module are integrated into a second board.
9. A configuration method, wherein: Applied to a second processing module, the second processing module includes a plurality of modules, and the second processing modules are respectively connected to the first processing module in communication; Each of the second processing modules is respectively connected to a corresponding storage module and a corresponding programmable module for communication; the method comprises: In response to the programmable module being powered on, acquiring configuration data from the storage module; The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module; The configuration data is written into the programmable module.
10. The method according to claim 9, wherein: The second processing module communicates with the programmable module via a serial peripheral interface SPI; Writing the configuration data into the programmable module comprises: The second processing module acts as an SPI host to write the configuration data into the programmable module.
11. The method according to any one of claims 9-10, wherein: Writing the configuration data into the programmable module comprises: The configuration data is written into a register of the programmable module, so that the programmable module obtains the configuration data from the register.
12. The method according to any one of claims 9 to 11, wherein: The programmable module is set to passive mode.
13. The method according to any one of claims 9 to 12, wherein: The storage module is non-volatile.
14. The method according to any one of claims 9 to 13, wherein: Before acquiring the configuration data from the storage module, the method further includes: receiving a configuration request sent by the first processing module; Erasing historical data in the programmable module and / or storage module based on the configuration request; The configuration data received from the first processing module is stored in the storage module.
15. The method according to claim 14, wherein: Before storing the configuration data received from the first processing module in the storage module, the method further comprises: Receiving verification information sent by the first processing module; It is determined that the configuration data passes verification based on the verification information.
16. The method according to any one of claims 14-15, wherein: The method further comprises: A sending result is returned to the first processing module, where the sending result is used to indicate whether the configuration data is sent successfully or failed.
17. A configuration method, applied to an electronic device; the electronic device comprises a first processing module, and a plurality of second processing modules respectively connected to the first processing module in communication; Each of the second processing modules is respectively connected to a corresponding storage module and a corresponding programmable module for communication; the method comprises: The first processing module acquires target configuration data of a target programmable module corresponding to a target second processing module among the plurality of the second processing modules; The first processing module sends the target configuration data to the target second processing module; Each of the target second processing modules stores the received target configuration data into a corresponding target storage module; In response to the target programmable module being powered on, the target second processing module acquiring the target configuration data from the target storage module; The target second processing module writes the target configuration data into the target programmable module.
18. A configuration device, applied to a first processing module, the first processing module being communicatively connected with a plurality of second processing modules; Each of the second processing modules is respectively connected to a corresponding programmable module for communication; the device comprises: A first acquisition module, used for acquiring target configuration data of a target programmable module corresponding to the target second processing module among the plurality of the second processing modules; The sending module is used to send the target configuration data to the target second processing module, so that the target second processing module configures the target programmable module using the target configuration data.
19. A configuration device, applied to a second processing module, the second processing module comprises a plurality of modules, and the second processing modules are respectively connected to the first processing module for communication; Each of the second processing modules is respectively connected to a corresponding storage module and a corresponding programmable module for communication; the device comprises: a second acquisition module, configured to acquire configuration data from the storage module in response to the programmable module being powered on; The configuration data is sent by the first processing module to the second processing module, and is received by the second processing module and stored in the storage module; A writing module is used to write the configuration data into the programmable module.
20. An electronic device, comprising: A first processing module; A plurality of second processing modules, respectively connected to the first processing modules for communication; A plurality of programmable modules and a plurality of storage modules; wherein each of the second processing modules is respectively connected to the corresponding storage module and the corresponding programmable module in communication; a memory for storing executable instructions of the processing module; Wherein, when the first processing module calls the executable instruction, the operation of any method of claims 1-8 is implemented; When the second processing module calls the executable instruction, the operation of any method described in claims 9-16 is implemented.
21. A computer-readable storage medium having computer instructions stored thereon, wherein when the computer instructions are executed by a processor, the steps of the method of any one of claims 1 to 8, or claims 9 to 16, or any one of claims 17 are implemented.
Citation Information
Patent Citations
Configuration manager and configuration method for configurable logic array
CN101593169A
FPGA configuration system and configuration method based on network
CN101783812A
Method and system for updating configuration data of FPGA (Field Programmable Gate Array) control unit
CN102866900A
FPGA-based embedded device online configuration method and system
CN106970778A
Information processing device and FPGA configuration method
WO2016098249A1
Cited By
Modular PLC system configuration method, modular PLC system and electronic equipment
CN120540185A