Configuration method and device, electronic equipment and storage medium
By sending configuration data to multiple second processing modules through the first processing module, the flexibility problem of the existing system when configuring multiple programmable devices is solved, rapid update and startup are achieved, and efficiency is improved.
Patent Information
- Application Number
- CN202311287309.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
Existing systems lack flexibility when configuring multiple programmable devices, and cannot update and start multiple devices at the same time, resulting in inefficiency.
The target configuration data is sent to the plurality of second processing modules through the first processing modules, so that the second processing modules can configure corresponding programmable modules. This method does not require on-site operation by technicians and is suitable for large systems with multiple programmable modules.
The rapid configuration data update and startup of multiple programmable modules is realized, which improves configuration flexibility and efficiency, and reduces labor and time costs.
Smart Images

Figure CN119718449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of technical software, and in particular, to a configuration method, device, electronic device, and storage medium. Background Art
[0002] Programmable devices such as FPGA (Field Programmable Gate Array) are widely used in many fields such as communication, security, and industry. With the development of business systems, some large systems such as power control systems often have multiple programmable devices. However, in the current system architecture, the system can often only update and start the configuration data of one programmable device at a time. Obviously, such a method is no longer applicable to large systems with multiple programmable devices. How to improve the configuration flexibility of programmable devices is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0003] 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.
[0004] 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:
[0005] Acquire target configuration data of a target programmable module corresponding to a target second processing module among the plurality of the second processing modules;
[0006] 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.
[0007] In an embodiment of the present application, the target configuration data is sent to the target second processing module through 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 through the first processing module, without the need for technical personnel to go to the site for updating. On the other hand, the first processing module can send configuration data to any programmable module through the second processing module without setting up additional equipment, so it is suitable for large systems with multiple programmable modules.
[0008] In some embodiments, the method further includes: determining the next target second processing module from the plurality of second processing modules, and returning to execute the step of obtaining target configuration data. The first processing module can configure and start the plurality of programmable modules through the plurality of second processing modules. For a large system with a plurality of programmable modules, the method of this embodiment can be used to quickly update the configuration data of the plurality of programmable modules and start the plurality of programmable modules, thereby improving the configuration flexibility and efficiency.
[0009] In some embodiments, 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 multiple second processing modules; wherein the target identifier is the 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 multiple second processing modules that receive the configuration request can determine whether they are the target second processing modules according to 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 performed based on the established communication.
[0010] 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 sequence of the plurality of programmable modules; generating a configuration request carrying the 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. By generating the configuration request according to the startup sequence of the programmable modules, the first processing module can control the startup sequence of the plurality of programmable modules, which can meet the requirements of different scenarios and further improve the flexibility of programmable module startup.
[0011] In some embodiments, the target configuration data acquired by different target second processing modules are different. 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, so as to be started in multiple ways, thereby improving the flexibility of programmable module configuration and startup.
[0012] 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.
[0013] In some embodiments, the first processing module is connected to the plurality of second processing modules via a controller area network (CAN) bus. The CAN bus is used to realize the communication connection between a first processing module and a plurality of second processing modules, and the data transmission efficiency is improved, thereby improving the configurability efficiency of the programmable module.
[0014] In some embodiments, the first processing module is integrated into the first board; each of the second processing modules and the corresponding programmable module is integrated into the 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 board, respectively, the first processing module communicates with the plurality of second processing modules through the connection between the boards, thereby realizing the communication connection between the first processing module and the plurality of second processing modules.
[0015] In a second aspect, an embodiment of the present application provides a configuration method, which is applied to a second processing module, wherein the second processing module includes a plurality of modules, and each of the second processing modules 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:
[0016] In response to the programmable module being powered on, acquiring configuration data from the storage module;
[0017] 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;
[0018] The configuration data is written into the programmable module.
[0019] 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, saving the time and cost of starting the programmable module.
[0020] In some embodiments, the second processing module communicates with the programmable module via a serial peripheral interface SPI; the writing of the configuration data into the programmable module includes: the second processing module acts as a SPI host to write the configuration data into the programmable module.
[0021] In some embodiments, the writing of the configuration data into the programmable module includes: writing the configuration data into 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 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.
[0022] In some embodiments, the programmable module is set to a passive mode. It can be seen that the second processing module sends configuration data to the programmable module, and the programmable module passively receives the configuration data, so that the configuration and startup process of the programmable module is controlled by the second processing module. The programmable module does not need to read the configuration data from an external memory, thereby speeding up the configuration efficiency and startup efficiency.
[0023] 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.
[0024] 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. Erasing historical data in the programmable module and / or storage module through the second processing module allows the programmable module to be configured based on the latest configuration data to meet business needs.
[0025] In some embodiments, before the configuration data received from the first processing module is stored in the storage module, the method further includes: receiving verification information sent by the first processing module; and determining that the configuration data passes the verification based on the verification information. The verification information is used to verify whether the target configuration data is lost or tampered with during the transmission process to verify the data integrity, thereby improving the configuration security of the programmable module.
[0026] In some embodiments, the method further includes: returning a sending result to the first processing module, the sending result being used to indicate whether the configuration data is sent successfully or failed. The sending result is fed back to the first processing module by the second 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.
[0027] 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 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 in communication; the method includes:
[0028] 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;
[0029] The first processing module sends the target configuration data to the target second processing module;
[0030] Each of the target second processing modules stores the received target configuration data into a corresponding target storage module;
[0031] 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;
[0032] The target second processing module writes the target configuration data into the target programmable module.
[0033] In a fourth aspect, an embodiment of the present application provides a configuration device, 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 device comprises:
[0034] 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;
[0035] 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.
[0036] 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 module includes a plurality of modules, and each of the second processing modules 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:
[0037] a second acquisition module, configured to acquire configuration data from the storage module in response to the programmable module being powered on;
[0038] 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;
[0039] A writing module is used to write the configuration data into the programmable module.
[0040] In a sixth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0041] A first processing module;
[0042] A plurality of second processing modules, respectively connected to the first processing modules for communication;
[0043] 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;
[0044] a memory for storing executable instructions of the processing module;
[0045] Wherein, when the first processing module calls the executable instruction, the operation of any method described in the first aspect is implemented;
[0046] When the second processing module calls the executable instruction, the operation of any method described in the second aspect is implemented.
[0047] 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
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. 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 related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A schematic diagram of an application scenario of a configuration method provided in an embodiment of the present application;
[0050] Figure 2 A flowchart of a configuration method provided in an embodiment of the present application;
[0051] Figure 3 A flowchart of a communication establishment process in a configuration method provided in an embodiment of the present application;
[0052] Figure 4 A flowchart of a configuration request generation process in a configuration method provided in an embodiment of the present application;
[0053] Figure 5 A flowchart of another configuration method provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of the process of erasing in another configuration method provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of a flow chart of a configuration data verification process in another configuration method provided in an embodiment of the present application;
[0056] Figure 8 A flowchart of another configuration method provided in an embodiment of the present application;
[0057] Fig. 9 A schematic diagram of an application scenario of a configuration method provided in an embodiment of the present application;
[0058] Fig.10 A flowchart of another configuration method provided in an embodiment of the present application;
[0059] Fig.11 A structural block diagram of a configuration device provided in an embodiment of the present application;
[0060] Fig.12 A structural block diagram of another configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] 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.
[0062] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and 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 cannot be understood as indicating or implying relative importance.
[0063] FPGA is a product further developed on the basis of programmable devices such as PAL (Programmable Array Logic) and GAL (Generic Array Logic). With the development of technology, some large systems such as those used for power control often have multiple programmable devices, such as multiple FPGAs.
[0064] 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 the configuration and startup. However, when the configuration data in the memory needs to be updated, technicians are required to update it on site, so such a 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, and 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 when starting, which causes inconvenience.
[0065] 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.
[0066] To this end, the embodiment of the present application proposes a configuration method for implementing the configuration of a programmable module such as an FPGA. Among them, the following hardware framework is designed for the electronic device: including a first processing module and a plurality of second processing modules that are communicatively connected thereto, and each second processing module corresponds to a programmable module. During configuration, the first processing module can send target configuration data to any target second processing module among the plurality of second processing modules, so that the target second processing module can configure the target programmable module using the target configuration data.
[0067] In the above framework, the first processing module can send configuration data to any programmable module through the second processing module, thereby quickly updating the configuration data of any programmable module and starting any programmable module. The above method does not require the presence of technicians or the setting of additional equipment, and can update and configure any programmable module, so it is suitable for large systems with multiple programmable modules.
[0068] According to some embodiments of the present application, Figure 1 The following are some application scenarios of the embodiments. Figure 1 As shown, the first processing module 101 is connected to the plurality of second processing modules 102 for communication. Figure 1 Two second processing modules 102 are shown. However, the number of the second processing modules 102 is not limited to two, and can be two or more.
[0069] Each second processing module 102 is respectively connected to a corresponding programmable module 103. For example, the second processing modules 102 and the programmable modules 103 may correspond one to one. In this way, the number of the second processing modules 102 and the number of the programmable modules 103 are the same.
[0070] Exemplarily, the first processing module 101, the first processing module 101 and the programmable module 103 may be hardware modules or software modules.
[0071] Exemplarily, the first processing module 101 and the second processing module 102 may be similar or identical processing modules, or may be different processing modules.
[0072] 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 SOC (System on Chip), xPU (x-Processing Unit), etc.
[0073] Optionally, the second processing module 102 may be an MCU (Microcontroller Unit). Of course, in addition to the MCU, the second processing module 102 may also be any other processing module with configuration capability that can implement the functions of the second processing module described below, such as but not limited to SOC, xPU, etc.
[0074] 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.
[0075] Of course, in addition to the above examples, the specific implementation form 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 realize 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 described in this embodiment.
[0076] In some embodiments, each second processing module 102 may be respectively connected to the corresponding programmable module 103 and may also be respectively connected to the corresponding storage module 104 .
[0077] Exemplarily, 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.
[0078] Exemplarily, the storage module 104 may be a hardware module or a software module.
[0079] Optionally, the storage module 104 may be a non-volatile storage, for example including but not limited to a Flash memory.
[0080] Optionally, the connection 105 between the first processing module 101 and the plurality of second processing modules 102 is a wired connection.
[0081] Optionally, the connection 106 between the second processing module 102 and the programmable module 103 is a wired connection.
[0082] According to some embodiments of the present application, a first aspect provides a configuration method, which is applied to Figure 1 The first processing module 101 shown in FIG. That is, the first processing module 101 serves as the method execution body of this embodiment. Figure 2 A schematic flow chart of a configuration method is shown, including steps 210 to 220.
[0083] Step 210: Acquire target configuration data of a target programmable module corresponding to a target second processing module among the plurality of second processing modules;
[0084] 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.
[0085] 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.
[0086] 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. The target programmable module can be started after being configured.
[0087] As an example, a programmable module for executing a service can be determined as a target programmable module according to service requirements, and its corresponding second processing module can be 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.
[0088] As an example, it can be determined 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, the new programmable module has not been configured, and there is no corresponding configuration data. In this way, the new programmable module can be determined as a target programmable module, and its corresponding second processing module is a target second processing module. By sending the target configuration data to the target second processing module by the first processing module, the configuration operation of the new programmable module can be completed.
[0089] As an example, the programmable module corresponding to the updated configuration data can be determined as the target programmable module, and the corresponding second processing module is 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.
[0090] In this embodiment, the target configuration data is sent to the target second processing module through 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 through the first processing module, without the need for technical personnel to go to the site for updating. On the other hand, the first processing module can send configuration data to any programmable module through the second processing module, without the need to set up additional equipment, so it is suitable for large systems with multiple programmable modules.
[0091] Based on the above embodiment, the above method may further include the steps of:
[0092] 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.
[0093] The target second processing module may include a plurality of them. Exemplarily, at least some of the second processing modules may be determined as the target second processing modules.
[0094] For each target second processing module, the first processing module can perform steps 210 to 220 on it. That is, for each target second processing module, after the first processing module obtains the target configuration data of its corresponding target programmable module and sends it to the target second processing module, it performs the same processing on the next target second processing module.
[0095] Exemplarily, the first processing module may determine a next target second processing module from a plurality of second processing modules.
[0096] It can be seen that, in the case where the target second processing modules include multiple ones, the first processing module executes step 210 to step 220 in a loop until all the target second processing modules obtain the corresponding target configuration data.
[0097] Optionally, after the first processing module completes executing steps 210 to 220 on the current target second processing module, the first processing module directly executes steps 210 to 220 on the next target second processing module.
[0098] Optionally, after the first processing module completes executing step 210 to step 220 on the current target second processing module, the first processing module executes step 210 to step 220 on the next target second processing module when a preset condition is met.
[0099] 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.
[0100] That is, after the first processing module completes execution of steps 210 to 220 for the current target second processing module, upon receiving the result returned by the current target second processing module, steps 210 to 220 are executed for the next target second processing module.
[0101] 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.
[0102] That is, after the first processing module completes execution of step 210-step 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, step 210-step 220 is executed on the next target second processing module.
[0103] If the sending result indicates that the first processing module fails 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 number of times.
[0104] In this embodiment, the first processing module can configure and start multiple programmable modules through multiple second processing modules. For a large system with multiple programmable modules, the method of this embodiment can be used to quickly update the configuration data of multiple programmable modules and start multiple programmable modules, thereby improving configuration flexibility and efficiency.
[0105] Based on the above embodiment, before executing step 210 to obtain the target configuration data, the method may further include: Figure 3 Steps 310 to 320 are shown.
[0106] Step 310: Sending a configuration request carrying a target identifier to a plurality of the second processing modules;
[0107] Wherein, the target identifier is the identifier of the target second processing module;
[0108] Step 320: Establish communication with the target second processing module.
[0109] The configuration request is used to request the target second processing module to receive target configuration data.
[0110] 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 in communication connection with the first processing module, or may be some of the second processing modules. The sending object of the configuration request may include the target second processing module.
[0111] 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.
[0112] 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.
[0113] Optionally, the first processing module may acquire target configuration data according to the target identifier.
[0114] Since the configuration request carries the target identifier, each second processing module can determine whether it is the request object of the configuration request, that is, the target second processing module, according to the target identifier after receiving the configuration request. If so, it can establish communication with the first processing module; if not, it ignores the configuration request.
[0115] Exemplarily, the first processing module establishing communication with the target second processing module may include: receiving a communication address returned by the target second processing module. That is, if a second processing module determines that the module is the target second processing module according to the target identifier, the communication address of the module is returned to the first processing module. The first processing module may send other data such as target configuration data based on the communication address.
[0116] 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.
[0117] Based on the above embodiment, before executing step 310 to send a configuration request to multiple second processing modules, the method may further include: Figure 4 Steps 410 - 420 are shown.
[0118] Step 410: Obtaining a startup sequence of the plurality of programmable modules;
[0119] Step 420: 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.
[0120] The startup sequence refers to the order of at least some of the multiple programmable modules in a certain startup. For a system with multiple programmable modules, multiple programmable modules may need to be started in some scenarios. In some scenarios, multiple programmable modules may also be required to be started in a certain order. The startup sequence of programmable modules may be the same or different in different scenarios or in different startups. The startup sequence of programmable modules can be set by technicians according to actual needs, and this application does not limit it here.
[0121] 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.
[0122] If multiple target second processing modules receive configuration requests in sequence according to the startup sequence, they will also receive target configuration data in sequence according to the startup sequence, 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 sequence.
[0123] In this embodiment, by generating a configuration request 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 requirements of different scenarios and further improve the flexibility of programmable module startup.
[0124] Based on any of the above embodiments, in the case of including multiple target second processing modules, different target second processing modules acquire different target configuration data.
[0125] That is, the first processing module can obtain different target configuration data and send them to different target second processing modules respectively. 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.
[0126] Of course, in some embodiments, the target configuration data acquired by different target second processing modules may be the same.
[0127] 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.
[0128] 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 can be started in multiple ways, thereby improving the flexibility of programmable module configuration and startup.
[0129] 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:
[0130] 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.
[0131] The verification information is used to verify whether the target configuration data is complete and has not been tampered with during the sending process.
[0132] Exemplarily, the first processing module can generate verification information using a verification algorithm according to the target configuration data, and send it to the target second processing module. The target second processing module can generate verification information using the same verification algorithm according to the received target configuration data. By judging whether the generated verification information is consistent with the received verification information, it is judged whether the target configuration data is intact and has not been tampered with during the sending process.
[0133] Exemplarily, 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.
[0134] 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 the target configuration data length information to the target second processing module.
[0135] In this way, the target second processing module can determine whether the target configuration data has been transmitted according to the length information.
[0136] Optionally, the target configuration data can be sent to the target second processing module in one go. Alternatively, the target configuration data can be sent to the target second processing module in batches due to the size of the data transmission amount. In this way, the target second processing module can determine whether the batch transmission is completed based on the length information in the transmission start command.
[0137] Optionally, after determining that the target configuration data transmission is completed according to the length information, the target second processing module may return transmission response information to the first processing module. In response to the transmission response information, the first processing module sends a transmission end command carrying verification information to the target second processing module.
[0138] In this embodiment, the target configuration data is checked by checking information to see whether it is lost or tampered with during the transmission process, so as to verify the data integrity, thereby improving the configuration security of the programmable module.
[0139] Based on any of the above embodiments, the first processing module and the plurality of the second processing modules are communicatively connected via a controller area network (CAN) bus.
[0140] That is, if Figure 1 The connection 105 between the first processing module 101 and the plurality of second processing modules 102 is shown to be a CAN bus.
[0141] CAN bus is a serial communication protocol bus for real-time applications. It uses twisted pair to transmit signals and is one of the most widely used field buses in the world. The characteristics of CAN protocol include complete serial data communication, real-time support, transmission rate up to 1Mb / s, and 11-bit addressing and error detection capabilities. CAN bus can connect many devices. Theoretically, 110 node devices can be connected to one CAN bus, and the maximum data transmission distance can reach 10KM.
[0142] Since a plurality of nodes can be connected to the CAN bus, the CAN bus can be used to realize communication connection between a first processing module and a plurality of second processing modules.
[0143] Of course, in addition to the CAN bus, other wired connections that can connect multiple nodes on one bus can also be used as Figure 1 The connection 105 between the first processing module 101 and the plurality of second processing modules 102 is not limited to the implementation of the CAN bus.
[0144] 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, and the data transmission efficiency is also improved, thereby improving the configurability efficiency of the programmable module.
[0145] Based on any of the above embodiments, Figure 1 The first processing module 101, multiple second processing modules 102, and multiple programmable modules 103 shown can be mounted in an electronic device, wherein 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.
[0146] Optionally, each second processing module 102 is also respectively connected to a corresponding storage module 104. In this way, the second board also integrates the storage module 104 corresponding to the second processing module 102.
[0147] 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 with the second board and is mounted in the same electronic device.
[0148] In this embodiment, the first processing module is integrated in the first board, and multiple second processing modules and corresponding programmable modules are respectively integrated in the second board, so that 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.
[0149] According to some embodiments of the present application, a second aspect provides a configuration method, which is applied to Figure 1 The second processing module 102 is shown. That is, the second processing module 102 serves as the method execution body of this embodiment. Figure 5 A schematic flow chart of a configuration method is shown, including steps 510 to 520.
[0150] Step 510: In response to the programmable module being powered on, obtaining configuration data from the storage module;
[0151] 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;
[0152] Step 520: Write the configuration data into the programmable module.
[0153] 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.
[0154] 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. The programmable module can be started after the configuration is completed, thus completing the startup process.
[0155] 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.
[0156] Based on the above embodiment, the second processing module communicates with the programmable module via a serial peripheral interface SPI (Serial Peripheral Interface). Thus, writing the configuration data into the programmable module in the above step 520 may include:
[0157] The second processing module acts as an SPI host to write the configuration data into the programmable module.
[0158] The second processing module communicates with the programmable module via SPI. Figure 1 The connection 106 between the second processing module 102 and the programmable module 103 is shown as SPI communication.
[0159] SPI is a synchronous serial communication protocol that can provide high-speed full-duplex communication. SPI is a master-slave type protocol that can provide a simple and low-cost interface between a master device and a slave device. In this embodiment, the second processing module, as an SPI master device, can write configuration data to the programmable module as an SPI slave device, so that the programmable module can be configured based on the configuration data and complete startup.
[0160] 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.
[0161] Based on the above embodiment, writing the configuration data into the programmable module in the above step 520 may include:
[0162] The configuration data is written into a register of the programmable module, so that the programmable module obtains the configuration data from the register.
[0163] The programmable module includes a register, which can be used to store other data such as configuration data. When the second processing module writes the configuration data into the programmable module, the configuration data is stored in the register. The programmable module then reads the configuration data from the register for configuration and startup.
[0164] 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.
[0165] Based on the above embodiment, the programmable module is set to passive mode.
[0166] In this embodiment, the second processing module sends configuration data to the programmable module, and the programmable module passively receives the configuration data, so that the configuration and startup process of the programmable module is controlled by the second processing module. The programmable module does not need to read the configuration data from an external memory, thereby speeding up the configuration efficiency and startup efficiency.
[0167] Based on the above embodiment, the storage module is non-volatile.
[0168] 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 into the programmable module. In order to prevent the configuration data in the storage module from being lost after the device is powered off, the storage module can use non-volatile storage, such as but not limited to Flash storage.
[0169] 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.
[0170] Based on the above embodiment, before executing step 510 to obtain configuration data from the storage module, the method may further include: Figure 6 Steps 610 - 630 are shown.
[0171] Step 610: receiving a configuration request sent by the first processing module;
[0172] Step 620: Erasing historical data in the programmable module and / or storage module based on the configuration request;
[0173] Step 630: Storing the configuration data received from the first processing module in the storage module.
[0174] 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.
[0175] Since the programmable module is usually configured based on a set of configuration data, the second processing module may erase the historical data in the programmable module and / or the storage module before receiving the configuration data. The so-called historical data refers to the historical configuration data.
[0176] After erasing the historical data, the new configuration data received from the first processing module is stored in the storage module.
[0177] 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.
[0178] Optionally, after erasing the 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.
[0179] Optionally, the configuration response information may carry the communication address of the second processing module, so that the first processing module can send other data such as configuration data based on the communication address.
[0180] 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.
[0181] Based on the above embodiment, before executing 630 to store the configuration data in the storage module, the method may further include: Figure 7 Steps 710 - 720 are shown.
[0182] Step 710: receiving verification information sent by the first processing module;
[0183] Step 720: Determine whether the configuration data passes the verification based on the verification information.
[0184] The verification information is used to verify whether the target configuration data is complete and has not been tampered with during the sending process.
[0185] Exemplarily, the first processing module can generate verification information using a verification algorithm based on the configuration data sent to the second processing module, and send it to the second processing module. The second processing module can generate verification information using the same verification algorithm based on the received configuration data. Subsequently, by comparing whether the received verification information is consistent with the generated verification information, it is determined whether the configuration data is complete and has not been tampered with during the sending process. Exemplarily, the verification algorithm used can be a CRC check.
[0186] In this embodiment, the target configuration data is checked by checking information to see whether it is lost or tampered with during the transmission process, so as to verify the data integrity, thereby improving the configuration security of the programmable module.
[0187] Based on the above embodiment, the method may further include the steps of:
[0188] 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.
[0189] Optionally, the sending result may be returned to the first processing module after the second processing module completes receiving the configuration data.
[0190] Optionally, the sending result may be returned to the first processing module after the second processing module determines that the configuration data passes verification.
[0191] After the sending result is returned, the process of sending the configuration data from the first processing module to the second processing module ends.
[0192] 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.
[0193] According to some embodiments of the present application, a third aspect provides a configuration method, which is applied to an electronic device. Figure 1As shown, the electronic device includes a first processing module 101 and a plurality of second processing modules 102 respectively connected to the first processing module 101 for communication. Each second processing module 102 is respectively connected to a corresponding storage module 104 and a corresponding programmable module 103 for communication. The method includes: Figure 8 Steps 810 - 850 are shown.
[0194] 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 the second processing modules;
[0195] Step 820: The first processing module sends the target configuration data to the target second processing module;
[0196] Step 830: Each of the target second processing modules stores the received target configuration data into a corresponding target storage module;
[0197] 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;
[0198] Step 850: The target second processing module writes the target configuration data into the target programmable module.
[0199] The specific process of implementing the above steps is detailed in the implementation process of any of the above embodiments, which will not be repeated here.
[0200] In this embodiment, the first processing module sends the configuration data of each programmable module to the second processing module, and the second processing module controls the configuration and startup of the 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 through the first processing module, without the need for technical personnel to go to the site for updating. On the other hand, the first processing module can send configuration data to any programmable module through the second processing module, without the need to set up additional equipment, so it is suitable for large systems with multiple programmable modules.
[0201] According to some embodiments of the present application, there is also provided a Fig. 9 The electronic device shown, and Fig.10 The configuration method shown.
[0202] See also Fig. 9 The electronic device 900 includes a CPU 901 and N MCUs 902, wherein N is a positive integer greater than 1. The CPU 901 and the MCU 902 are connected to each other via a CAN bus.
[0203] Each MCU 902 is connected to the corresponding FPGA 903 and the corresponding Flash memory 904. The number of MCU 902, FPGA 903 and Flash memory 904 is N. MCU 902 and FPGA 903 are connected to each other through the SPI bus.
[0204] The CPU 901 is integrated in 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 in the second board. The number of the second board is N.
[0205] See also Fig.10 , CPU 901 first sends a configuration request t1 to MCU 902 (step 1001).
[0206] Optionally, the configuration request t1 carries the number of FPGA903 (e.g., number 1, number 2, ... or number N) and the name of the configuration data. The number of FPGA903 is the target identifier. CPU901 can obtain the corresponding configuration data according to the name of the configuration data. In addition, CPU901 can send the configuration request t1 to multiple MCU902. Since the configuration request t1 carries the target identifier, each MCU902 can determine whether it is the request object of the configuration request t1 according to the target identifier.
[0207] If not, the configuration request is ignored. If yes, the historical data in the corresponding FPGA903 and / or the corresponding Flash memory 904 is erased (step 1002), and the configuration response information r1 is returned to the CPU901 (step 1003). The configuration response information r1 may carry the communication address of the module, so that the CPU901 establishes a communication connection with the MCU902 based on the communication address, and transmits and receives data based on the communication address.
[0208] In response to the configuration response information r1, the CPU 901 sends a transmission start command t2 to the MCU 902 (step 1004). The transmission start command t2 may carry the length information of the configuration data. Subsequently, the CPU 901 sends a data transmission command t3 to the MCU 902 (step 1005), and the data transmission command t3 carries at least part of the configuration data. In response to the data transmission command t3, the MCU 902 stores the configuration data carried in the data transmission command t3 in the Flash memory 904 (step 1006).
[0209] If the data transmission command t3 carries all the configuration data, steps 1005-1006 are executed once. If the data transmission command t3 carries part of the configuration data, steps 1005-1006 are executed in a loop until all the configuration data are sent to the MCU 902. That is, the configuration data can be sent to the MCU 902 in batches through the data transmission command t3.
[0210] MCU902 can determine whether the configuration data has been transmitted based on the length information in the transmission start command t2. If it is determined to be, it sends a transmission response message r2 to CPU901 (step 1007).
[0211] 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.
[0212] If the sending result r3 indicates failure, the CPU 901 may re-execute the configuration data sending process of step 1001 to step 1010 on the current MCU 902 .
[0213] 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 .
[0214] If the FPGA 903 needs to be started in a certain startup sequence, the CPU 901 can determine the MCU 902 in the current sequence in sequence according to the startup sequence, and after the configuration data sending process of step 1001 to step 1010 is completed for the MCU 902 in the current sequence, and when the sending result r3 indicates success, the next MCU 902 is determined according to the startup sequence. The configuration data sending process of step 1001 to step 1010 is repeated until each FPGA 903 is started in the startup sequence.
[0215] After successfully receiving the configuration data, MCU902 responds to the FPGA103 powering on, and MCU902, as the SPI host, writes the configuration file into FPGA103 via the SPI bus in the passive mode of FPGA103, so that FPGA103 is configured using the configuration data. After completing the configuration, FPGA103 starts.
[0216] 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 connected to multiple second processing modules in communication; each second processing module is connected to a corresponding programmable module in communication. Fig.11 As shown, the configuration device 1100 includes:
[0217] A first acquisition module 1110 is used to acquire target configuration data of a target programmable module corresponding to the target second processing module among the plurality of the second processing modules;
[0218] The sending module 1120 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.
[0219] In some embodiments, the configuration device 1100 further includes:
[0220] A determination module is used to determine a next target second processing module from a plurality of the second processing modules and return to the first acquisition module 1110 shown.
[0221] In some embodiments, the configuration device 1100 further includes:
[0222] A configuration request module, used 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;
[0223] A communication module is used to establish communication with the target second processing module.
[0224] In some embodiments, the configuration device 1100 further includes:
[0225] A startup sequence module, used to obtain the startup sequence of the plurality of programmable modules;
[0226] 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 a second processing module corresponding to the programmable module in the current sequence.
[0227] In some embodiments, the target configuration data acquired by different target second processing modules are different or the same.
[0228] In some embodiments, the configuration device 1100 further includes:
[0229] 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.
[0230] In some embodiments, the first processing module is communicatively connected with a plurality of the second processing modules via a controller area network (CAN) bus.
[0231] 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.
[0232] According to some embodiments of the present application, a fifth aspect further provides a configuration device, which is applied to a second processing module, wherein the second processing modules include a plurality of modules, and are respectively connected to the first processing module in communication; each of the second processing modules is respectively connected to the corresponding storage module and the corresponding programmable module in communication. Fig.12 As shown, the configuration device 1200 includes:
[0233] A second acquisition module 1210, configured to acquire configuration data from the storage module in response to the programmable module being powered on;
[0234] 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;
[0235] The writing module 1220 is used to write the configuration data into the programmable module.
[0236] In some embodiments, the second processing module communicates with the programmable module via a serial peripheral interface SPI; the writing module 1220 is specifically used for:
[0237] The second processing module acts as an SPI host to write the configuration data into the programmable module.
[0238] In some embodiments, the writing module 1220 is specifically used to: write the configuration data into the register of the programmable module, so that the programmable module obtains the configuration data from the register.
[0239] In some embodiments, the programmable module is set to a passive mode.
[0240] In some embodiments, the storage module is non-volatile.
[0241] In some embodiments, the configuration device 1200 further includes:
[0242] A receiving module, used for receiving a configuration request sent by the first processing module;
[0243] An erasing module, configured to erase historical data in the programmable module and / or storage module based on the configuration request;
[0244] A storage module is used to store the configuration data received from the first processing module in the storage module.
[0245] In some embodiments, the configuration device 1200 further includes:
[0246] A receiving module, used for receiving the verification information sent by the first processing module;
[0247] A verification module is used to determine whether the configuration data passes the verification based on the verification information.
[0248] In some embodiments, the configuration device 1200 further includes:
[0249] The sending result module is used to return a sending result to the first processing module, and the sending result is used to indicate whether the configuration data is sent successfully or failed.
[0250] 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, which will not be repeated here.
[0251] Based on the method described in any of the above embodiments, the present application also provides Figure 1 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 1 At the hardware level, the electronic device includes a first processing module; a plurality of second processing modules, which are respectively communicated with the first processing module; a plurality of programmable modules and a plurality of storage modules; wherein each second processing module is respectively communicated 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; when the second processing module calls the executable instructions, the operation of the method described in any of the above embodiments is implemented.
[0252] 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.
[0253] 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.
[0254] In several embodiments provided in the present 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 schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to 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 a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order 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 with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0255] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0256] 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods 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.
[0257] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0258] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0259] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A configuration method, characterized in that: Applied to a first processing module, 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: 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: Applied to a second processing module, the second processing modules include a plurality of modules, and are respectively connected to the first processing module in communication; each of the second processing modules is respectively connected to the corresponding storage module and the corresponding programmable module in communication; the method includes: 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, characterized in that The second processing module communicates with the programmable module via a serial peripheral interface SPI; and 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, characterized in that: 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, characterized in that: The programmable module is set to passive mode.
13. The method according to any one of claims 9 to 12, characterized in that: The storage module is non-volatile.
14. The method according to any one of claims 9 to 13, characterized in that: 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, characterized in that 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, characterized in that: 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, characterized in that: Applicable to electronic equipment; the electronic equipment comprises a first processing module, and a plurality of second processing modules 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 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, characterized in that: Applied to a first processing module, 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 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, characterized in that: Applied to a second processing module, the second processing modules include a plurality of modules, and are respectively connected to the first processing module in communication; each of the second processing modules is respectively connected to the corresponding storage module and the corresponding programmable module in communication; the device includes: 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, characterized in that: The electronic device comprises: 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, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of the method of any one of claims 1-8, or claims 9-16, or any one of claims 17 are implemented.
Citation Information
Patent Citations
Configuration manager and configuration method for configurable logic array
CN101593169A
Program loading method, device and system and storage medium
CN113312098A