External chip control method of processor, architecture, equipment and storage medium

By setting the first memory and the second memory in the processor, the control information is periodically read and encapsulated and transmitted to the external chip in a full-duplex communication mode, which solves the problem of balancing the processor load rate and data integrity in the existing technology. problem, achieving simplification and stability improvement of chip control.

CN118796754APending Publication Date: 2024-10-18DEEPAL AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410861838.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology is difficult to find a balance between increasing the processor load rate and ensuring data integrity, and the chip control method is complex and difficult to simplify.

Method used

By setting the first memory and the second memory in the processor, the control information is periodically read, parsed and encapsulated into communication frames and transmitted to the external chip in full-duplex communication mode, simplifying the chip control process and reducing the processor load rate. and ensure data integrity.

Benefits of technology

It achieves simplification of chip control and reduction of processor load rate, avoids data loss and system crash, improves the stability and reliability of chip control, and ensures data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796754A_ABST
    Figure CN118796754A_ABST
Patent Text Reader

Abstract

The invention provides an external chip control method of a processor, a framework, equipment and a storage medium, the method is applied to the framework that the processor is externally connected with a plurality of external chips, the processor is internally provided with a first memory and a second memory, each external chip is internally provided with a plurality of registers, and the method comprises the following steps: acquiring control information stored in the first memory; the control information is analyzed, an external chip matched with each control object and register information of the external chip matched with each control instruction are determined, and the register information comprises a register to be controlled and a register value; reading the register information written into the second memory every preset time interval, and packaging each piece of register information into a communication frame; and transmitting the communication frame to a corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value. Therefore, the load rate of the processor is reduced, the data integrity is ensured, and the chip control process is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of processor technology, and in particular to a method, architecture, device and storage medium for controlling an external chip of a processor. Background Art

[0002] The domain controller is an important part of the modern automotive electronic control system. It divides the various functions of the vehicle into different domains, such as the power domain, body domain, and cockpit domain, and centrally manages these functions through high-performance processors to achieve intelligent control of the vehicle. The domain controller usually integrates one or more high-performance processors and mounts external chips. Among them, the processor is the core component of the domain controller, which is used to execute instructions from the domain controller, process input data, and generate output data to control various functions of the vehicle. The performance and architecture of the processor determine the overall performance of the domain controller; the external chip is a chip that is independently installed in the vehicle and is not inside the domain controller. Through the collaborative work of the external chip and the processor, various functions of the car can be realized. However, with the increasing types and number of mounted external chips, the control of the chip has become more complicated, which requires the processor to have higher computing power to meet the requirements of real-time and accuracy of chip control, and it is necessary to use processor resources reasonably to avoid data loss due to processor overload during chip control.

[0003] Chinese patent CN117370265A discloses a control method, device, chip structure and medium for a multi-core chip structure, which controls the chip by switching between synchronous transmission mode and asynchronous transmission mode. However, although this solution reduces the processor load rate, it has certain requirements for the stack, and the implementation method is complex and difficult to transplant. Therefore, how to simplify the chip control method while improving the processor load rate and ensuring data integrity is a problem that needs to be solved urgently. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method, architecture, device and storage medium for controlling an external chip of a processor to solve the technical problem of how to simplify the chip control method while improving the processor load rate and ensuring data integrity.

[0005] In a first aspect, the present invention provides a method for controlling an external chip of a processor, which is applied to an architecture in which a processor is externally connected to multiple external chips, wherein the processor is provided with a first memory and a second memory, and each of the external chips is provided with multiple registers, comprising: acquiring control information stored in the first memory, wherein the control information comprises a control object and a control instruction; parsing each of the control information to determine the external chip matching each of the control objects, and register information of the external chip matching each of the control instructions, wherein the register information comprises a register to be controlled and a register value; reading the register information written in the second memory at a preset time interval, and encapsulating each of the register information into a communication frame; transmitting the communication frame to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

[0006] In one embodiment of the present invention, the control information is parsed to determine the external chip that matches each control object and the register information in the external chip that matches each control instruction, including: inputting each control information into a preset object configuration table to determine the external chip that matches each control object and the configuration item that matches each control instruction, the preset object configuration table including a mapping relationship between the control object and the external chip and a mapping relationship between the control instruction and the configuration item; querying the preset chip configuration table according to each configuration item in the external chip to determine the register information in the external chip, the preset chip configuration table including a mapping relationship between the configuration item and the register information.

[0007] In one embodiment of the present invention, enabling the external chip to control the register to be controlled according to the register value includes: determining the register to be controlled in the external chip according to the register information; and updating the value currently stored in the register to be controlled to the corresponding register value.

[0008] In one embodiment of the present invention, before reading the register information written in the second memory at each preset time interval, it also includes: dividing the second memory to obtain a register instruction bitmap area, a register address area and a register value address area; wherein the register instruction bitmap area is used to store register instructions corresponding to each of the registers, and the register instructions include writing to a register, reading a register, clearing a register and no operation; the register address area is used to store the address of each of the registers corresponding to the external chip, and the register value address area is used to store the value in each of the registers and the address of the value.

[0009] In one embodiment of the present invention, the register information is written into the second memory, including: generating a target register instruction corresponding to each of the register information, the target memory instruction being a write register; based on the target register instruction, updating the register instruction corresponding to each of the registers to be controlled in the second memory; and changing the value in each of the registers to be controlled in the second memory to the corresponding register value, so that the register information is written into the second memory.

[0010] In one embodiment of the present invention, after enabling the external chip to control the register to be controlled according to the register value, it also includes: after completing the control of the register to be controlled, using the external chip to generate feedback information; in response to the feedback information, changing the register instruction corresponding to the register to be controlled in the second memory to no operation, and changing the control instruction matching the register information in the first memory to no operation; if the processor receives new control information, reading each control information stored in the first memory, and using the new control information as target control information; if the target control information and any control information in the first memory are mutually exclusive, not writing the target control information to the first memory; if the control object in the target control information is consistent with the control object in any control information, changing the control information in the first memory to the target control information.

[0011] In one embodiment of the present invention, encapsulating each register information into a communication frame includes: determining the external chip corresponding to each register information; if the external chips corresponding to each register information are consistent, encapsulating each register information into the same communication frame.

[0012] In a second aspect, the present invention also provides an external chip control architecture of a processor, which is applied to a processor, wherein the processor is externally connected to multiple external chips, the processor is provided with a first memory and a second memory, and each of the external chips is provided with multiple registers, including: a logic layer, used to receive control information, the control information including a control object and a control instruction; the first memory, used to store the control information; a control layer, used to periodically read the control information in the first memory, and parse each control information to determine the external chip matching each control object, and the register information of the external chip matching each control instruction, the register information including a register to be controlled and a register value; the second memory module, used to store the register information; a communication layer, used to read the register information from the second memory at a preset interval, encapsulate each register information into a communication frame, and transmit the communication frame to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

[0013] In a third aspect, the present invention also provides an electronic device comprising: a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the external chip control method of the processor as described in the above embodiment.

[0014] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of a computer, enables the computer to execute the external chip control method of the processor as described in the above embodiments.

[0015] Beneficial effects of the present invention: The present invention proposes a method, architecture, device and storage medium for controlling an external chip of a processor. By simply setting a first memory and a second memory, the registers in the external chip are periodically controlled, which reduces the number of chip controls. In this way, the chip control process is simplified, the processor load rate is effectively reduced, data loss and system crash are avoided, the chip control is highly stable and reliable, and the register information of the same external chip is encapsulated into the same communication frame within each preset time, so that the external chip can only be accessed once within each preset time, further ensuring the integrity of the data.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0018] Figure 1 is a schematic diagram of a synchronization control logic shown in an exemplary embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of an asynchronous control logic shown in an exemplary embodiment of the present invention;

[0020] Figure 3 It is a schematic diagram of an implementation environment of an external chip control method of a processor shown in an exemplary embodiment of the present invention;

[0021] Figure 4 is a flowchart of a method for controlling an external chip of a processor shown in an exemplary embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of an architecture of a processor connected to an external chip according to an exemplary embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of a chip control architecture inside a processor according to an exemplary embodiment of the present invention;

[0024] Figure 7 is a schematic diagram of a register instruction bitmap shown in an exemplary embodiment of the present invention;

[0025] Figure 8 is a schematic diagram of a control instruction bitmap shown in an exemplary embodiment of the present invention;

[0026] Fig. 9 is a block diagram of an external chip control architecture of a processor shown in an exemplary embodiment of the present invention;

[0027] Fig.10 It is a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present invention, shown in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0029] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner, and thus the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the form, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0030] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0031] It should be understood that the automotive electronic control system (Electronic Control System) is an indispensable part of modern cars. It is responsible for monitoring and controlling various functions of the car, such as engine control, chassis control, body control, safety system, entertainment system, etc. With the improvement of automobile intelligence and automation, the system has become more and more complex, the types and number of external chips mounted are increasing, and the computing power requirements of the processor are also increasing. The cooperation between the external chip and the processor is the key to ensure the efficient and stable operation of the entire system. In the relevant technology, the method of processor controlling the external chip mainly includes the method based on synchronous control of the external chip and the method based on asynchronous control of the external chip.

[0032] See also Figure 1 and Figure 2 , is a schematic diagram of synchronous control logic and asynchronous control logic according to an exemplary embodiment of the present invention. Figure 1As shown in the figure, the synchronous control of external chips is a direct and sequential access method. When the processor needs to operate the external chip, it will send instructions to the chip, operate the register, start communication, and continue to wait for the communication to complete. Once the communication is completed, the processor will receive feedback on the communication status. Its advantages are simple architecture and easy implementation. The disadvantages include: first, it increases the load rate of the processor. Since the processor needs to wait for the communication to complete, it will not be able to perform other work during the waiting period, thereby increasing the idle time of the processor and reducing efficiency. Especially when multiple external chips or multiple registers need to be accessed frequently, the load rate of the processor will increase exponentially; second, it is difficult to ensure the integrity of the data. If two tasks with different cycles try to access the same register at the same time, and the previous task has not yet been completed, the next task starts to operate, which may cause the data in the register to be overwritten or confused, thereby destroying the integrity of the data.

[0033] like Figure 2 As shown in the figure, asynchronous control of external chips is a non-blocking access method. When the processor needs to operate the external chip, it will start the communication and suspend the current task, and then immediately turn to process other tasks. The advantage of asynchronous control is that it effectively reduces the load rate of the processor. Since the processor can perform other tasks while waiting for the communication to complete, its utilization rate is improved and the load rate is reduced accordingly; the disadvantages of asynchronous control include: first, the implementation method is relatively complex, involving task suspension and activation mechanisms, and high requirements for the stack, so it is relatively difficult to implement; second, the problem of data loss that may exist in synchronous control has not been solved. If multiple tasks access the same register at the same time, data corruption may still occur.

[0034] Based on this, the present invention proposes a method, architecture, device and storage medium for controlling an external chip of a processor to solve the problems existing in the above-mentioned synchronous control and asynchronous control.

[0035] See also Figure 3 , is a schematic diagram of an implementation environment of an external chip control method of a processor according to an exemplary embodiment of the present invention. Figure 3 As shown, the implementation environment includes a vehicle 310 and a controller 320, wherein the controller 320 is embedded in the vehicle 310, and is used to implement the external chip control method of the processor. The controller 320 is mounted with an external chip. By setting a first memory and a second memory in the processor included in the controller 320, and by periodically and synchronously writing control information in the first memory and register information in the second memory, periodic control of the registers in the external chip is achieved. In this way, not only the chip control process is simplified, but also the processor load rate during the chip control process is reduced, thereby ensuring data integrity.

[0036] See also Figure 4 , is a flowchart of a method for controlling an external chip of a processor according to an exemplary embodiment of the present invention. The method can be applied to Figure 3 The implementation environment shown in the figure may also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable. Figure 4 As shown, in an exemplary embodiment, the external chip control method of the processor is applied as follows Figure 5 The processor shown is connected to a plurality of external chips, the processor is provided with a first memory and a second memory, and each external chip is provided with a plurality of registers. The method includes at least steps S410 to S440, which are described in detail as follows:

[0037] Step S410, acquiring control information stored in the first memory, where the control information at least includes a control object and a control instruction.

[0038] In one embodiment of the present invention, control information is read from the first memory at a preset interval to periodically synchronize the current control information, and each control information stored in the first memory is continuously updated, thereby reducing the number of register accesses during chip control. Taking the operation of lowering a car window as an example, the control object is the car window and the control instruction is lowering; if the control information is to control the rotation of a rearview mirror, then the control object is the rearview mirror and the control instruction is rotating.

[0039] Specifically, if the processor receives new control information, it reads each control information stored in the first memory, and uses the new control information as the target control information; if the target control information and any control information in the first memory are mutually exclusive, the target control information is not written into the first memory; if the control object in the target control information is consistent with the control object in any control information, the control information in the first memory is changed to the target control information. In this way, it avoids the situation where multiple control information at the same time involves controlling the same register, ensures data integrity, and updates control information in a timely manner, avoiding reading multiple control instructions of the same control object received at different time points from the first memory, resulting in excessive unnecessary chip control later.

[0040] See also Figure 6 , is a schematic diagram of a chip control architecture inside a processor according to an exemplary embodiment of the present invention. The control information received by the processor can be Figure 6 The logic layer in the first memory can be written to the first memory, and preset filtering conditions can be set in the logic layer according to actual needs. The preset filtering conditions at least control information mutual exclusion and illegal control information. If the control information meets the preset filtering conditions, it will not be written to the first memory, avoiding subsequent incorrect control of the external chip, and improving the flexibility and security of the processor when controlling the chip. In addition, the preset filtering conditions are applied after the control information is written to the first memory, such as Figure 6 The control layer in the filter filters the control information synchronized from the first memory.

[0041] Step S420, parsing each control information to determine an external chip matching each control object and register information of an external chip matching each control instruction, wherein the register information includes a register to be controlled and a register value.

[0042] In one embodiment of the present invention, each control information is input into a preset object configuration table to determine the external chip that matches each control object and the configuration item that matches each control instruction. The preset object configuration table includes a mapping relationship between the control object and the external chip, and a mapping relationship between the control instruction and the configuration item. The preset chip configuration table is queried according to each configuration item in the external chip to determine the register information in the external chip. The preset chip configuration table includes a mapping relationship between the configuration item and the register information.

[0043] In one embodiment of the present invention, each control object is matched with only one external chip, and one external chip can be matched with multiple control objects. Each control instruction may be matched with multiple configuration items, and the preset object configuration table can be adjusted according to actual needs. Figure 6 If the chip A (external chip) in the control window is matched, the control instruction is matched with the chip A including various configuration items to determine the configuration item that matches the control instruction of lowering the window. The principle of realizing the lowering of the window is to control the motor reversal of the window. If the four MOS tubes (i.e., metal oxide semiconductor field effect transistors) involved in the control motor include MOS tube 1, MOS tube 2, MOS tube 3, and MOS tube 4, and the motor reverses when MOS tube 1 and MOS tube 4 are turned on and MOS tube 2 and MOS tube 3 are turned off, the control instruction is matched with the four configuration items, and the four configuration items are respectively MOS tube 1 is turned on, MOS tube 4 is turned on, MOS tube 2 is turned off, and MOS tube 3 is turned off.

[0044] In one embodiment of the present invention, the register in the external chip is usually associated with the configuration item. When the configuration item of the chip is modified, the register value associated with the configuration item will also change, thereby changing the working state of the chip. Take the configuration item of controlling the lowering of the car window and turning on MOS tube 1 as an example. The configuration item was originally MOS tube 1 turned off, and it has changed. Therefore, it is necessary to adjust the value currently stored in the corresponding register. A certain bit or combination in the corresponding register is used to control the on and off of MOS tube 1. Then usually this bit or combination will be set to a specific value, that is, the value stored in the register. When the value is set to 1, the logic circuit may generate a high-level signal to the gate of MOS tube 1, thereby turning on MOS tube 1. At this time, the value 1 corresponding to the on-state of MOS tube 1 is called the register value.

[0045] In one embodiment of the present invention, Figure 6 As shown, the control information may also include parameters, and the parameters may be transmitted to the external chip through a physical connection between the processor and the external chip matching the control object. In addition, if the parameters need to be implemented by adjusting the values ​​stored in the registers in the external chip, the register information matching the parameters is determined based on the mapping relationship between the parameters and the register information. The parameters include parameter names and parameter values, and the parameter names correspond to the registers one-to-one, and the parameter values ​​correspond to the register values ​​one-to-one.

[0046] Step S430, reading the register information written in the second memory at every preset time interval, and encapsulating each register information into a communication frame.

[0047] In one embodiment of the present invention, the second memory includes a register instruction bitmap area, a register address area and a register value address area; wherein the register instruction bitmap area is used to store the register instructions corresponding to each register, the register instructions include write register, read register, clear register and no operation, the register address area is used to store the address of the external chip corresponding to each register, and the register value address area is used to store the value in each register and the address of the value.

[0048] See also Figure 7 , is a schematic diagram of a register instruction bitmap shown in an exemplary embodiment of the present invention. Figure 6 and Figure 7 As shown, the register instruction bitmap area in the second internal portion includes the register instruction bitmap area. Figure 1 To register instruction bit Figure X , external chip and register instruction bits Figure 1 One-to-one correspondence, with register instruction bits Figure 1 For example, it includes register instructions corresponding to Y registers, namely Figure 6 The register address area is Figure 6 The register address array in . Figure 7 As shown, each register instruction in the register instruction bitmap occupies 2 bits, and the stored register instruction can be any one of no operation NO_CMD, read register RD_CMD, clear register CL_CMD and write register WR_CMD. In addition, the address of the value in the register is a pointer to the value in the register.

[0049] In one embodiment of the present invention, a target register instruction corresponding to each register information is generated, and the target memory instruction is a write register; based on the target register instruction, the register instruction corresponding to each register to be controlled in the second memory is updated; the value in each register to be controlled in the second memory is changed to the corresponding register value, so that the register information is written into the second memory. In this way, the real-time update of each register information stored in the second memory is realized, and the register information in the second memory is synchronized once every preset time interval, which reduces the number of register accesses and ensures the accuracy and real-time performance of chip control.

[0050] In one embodiment of the present invention, the external chip corresponding to each register information is determined; if the external chips corresponding to each register information are consistent, each register information is packaged into the same communication frame.

[0051] In one embodiment of the present invention, in addition, register information is synchronized at preset intervals, and register information under the same external chip is encapsulated into a communication frame, so that the processor can periodically control the external chip, and the implementation method is simple, the hierarchy is clear, and the portability is high. In addition, each external chip only performs the task of chip control once within the preset time, avoiding conflicts among multiple tasks, and effectively ensuring the integrity of data.

[0052] Step S440, transmitting the communication frame to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

[0053] In one embodiment of the present invention, the external chip receives a register to be controlled in the external chip according to register information; the value currently stored in the register to be controlled is updated to the corresponding register value, so that the processor completes the control of the external chip according to the control information.

[0054] In one embodiment of the present invention, after completing the control of the register to be controlled, feedback information is generated using an external chip; in response to the feedback information, the register instruction corresponding to the register to be controlled in the second memory is changed to no operation, and the control instruction matching the register information in the first memory is changed to no operation.

[0055] See also Figure 8 , is a schematic diagram of a control instruction bitmap shown in an exemplary embodiment of the present invention. Figure 8 As shown in the figure, each control instruction occupies 1 bit, and the number of control instructions can be set according to actual needs. When the register instruction is set to no operation NO_CMD, no operation is performed. In this way, the processor is prevented from repeatedly performing the same control on the external chip and increasing the load rate.

[0056] Based on the above embodiments, the present invention proposes a method for controlling an external chip of a processor, which has the following advantages: by simply setting a first memory and a second memory, the registers in the external chip are periodically controlled, the number of chip controls is reduced, the chip control process is simplified, and the load rate of the processor is effectively reduced, data loss and system crash are avoided, and the chip control has high stability and reliability; and the register information of the same external chip within each preset time is encapsulated into the same communication frame, so that the external chip can only be accessed once within each preset time, further ensuring the integrity of the data.

[0057] See also Fig. 9 , is a block diagram of an external chip control architecture of a processor shown in an exemplary embodiment of the present invention. The architecture can be applied to Figure 3 The implementation environment shown in the figure may also be applied to other implementation environments. It should be understood that the present application does not limit the implementation environment of the architecture. Figure 7 As shown, the external chip control architecture of the exemplary processor is applied to the processor, the processor is connected to multiple external chips, the processor is provided with a first memory and a second memory, and each external chip is provided with multiple registers, including: a logic layer 910, a first memory 920, a control layer 930, a second memory 940 and a communication layer 950.

[0058] The logic layer 910 is used to receive control information, where the control information includes a control object and a control instruction;

[0059] A first memory 920, used to store control information;

[0060] The control layer 930 is used to periodically read the control information in the first memory, and parse each control information to determine the external chip matching each control object and the register information of the external chip matching each control instruction, wherein the register information includes the register to be controlled and the register value;

[0061] The second memory 940 is used to store register information;

[0062] The communication layer 950 is used to read register information from the second memory at preset intervals, encapsulate each register information into a communication frame, and transmit the communication frame to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

[0063] It should be noted that the external chip control architecture of the processor provided in the above embodiment and the external chip control method of the processor provided in the above embodiment belong to the same concept, and the specific way of performing the operation in each step has been described in detail in the system embodiment and will not be repeated here. Fig. 9For a more detailed example of the external chip control architecture of the processor shown, please refer to Figure 6 .

[0064] An embodiment of the present invention also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the electronic device implements the external chip control method of the processor provided in the above-mentioned embodiments.

[0065] See also Fig.10 , shows a schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present invention. It should be noted that, Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0066] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 10010 to the random access memory (RAM) 1003, such as executing the method in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.

[0067] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0068] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the system of the present invention are executed.

[0069] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the external chip control method of the processor as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0070] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0071] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the above-mentioned 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 boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession 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 or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified functions or operations, or can be implemented with a combination of dedicated hardware and computer instructions.

[0072] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for controlling an external chip of a processor, It is characterized in that Applicable to an architecture in which a processor is connected to multiple external chips, the processor is provided with a first memory and a second memory, and each of the external chips is provided with multiple registers, the method comprises: Acquire control information stored in the first memory, the control information including a control object and a control instruction; Parsing each of the control information to determine the external chip matching each of the control objects and the register information of the external chip matching each of the control instructions, wherein the register information includes the register to be controlled and the register value; Read the register information written in the second memory at a preset time interval, and encapsulate each register information into a communication frame; The communication frame is transmitted to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

2. The external chip control method of the processor according to claim 1, It is characterized in that The parsing of each of the control information to determine the external chip matching each of the control objects and the register information in the external chip matching each of the control instructions includes: Input each of the control information into a preset object configuration table, determine the external chip that matches each of the control objects, and the configuration item that matches each of the control instructions, wherein the preset object configuration table includes a mapping relationship between the control objects and the external chips, and a mapping relationship between the control instructions and the configuration items; The preset chip configuration table is queried according to each of the configuration items in the external chip to determine the register information in the external chip, wherein the preset chip configuration table includes a mapping relationship between the configuration items and the register information.

3. The external chip control method of the processor according to claim 2, It is characterized in that The step of causing the external chip to control the register to be controlled according to the register value includes: Determine the register to be controlled in the external chip according to the register information; The value currently stored in the register to be controlled is updated to the corresponding register value.

4. The external chip control method of the processor according to claim 2, It is characterized in that Before reading the register information written in the second memory at each preset time interval, the method further includes: Dividing the second memory to obtain a register instruction bitmap area, a register address area, and a register value address area; Among them, the register instruction bitmap area is used to store the register instructions corresponding to each of the registers, and the register instructions include writing to the register, reading from the register, clearing the register and no operation. The register address area is used to store the address of each of the registers corresponding to the external chip, and the register value address area is used to store the value in each of the registers and the address of the value.

5. The external chip control method of the processor according to claim 4, It is characterized in that Writing the register information into the second memory includes: Generate a target register instruction corresponding to each register information, wherein the target memory instruction is a write register; Based on the target register instruction, updating the register instruction corresponding to each register to be controlled in the second memory; The value in each of the registers to be controlled in the second memory is changed to the corresponding register value, so that the register information is written into the second memory.

6. The external chip control method of the processor according to claim 5, It is characterized in that After causing the external chip to control the register to be controlled according to the register value, the method further includes: After completing the control of the register to be controlled, generating feedback information using the external chip; In response to the feedback information, changing the register instruction corresponding to the register to be controlled in the second memory to a no operation, and changing the control instruction matching the register information in the first memory to a no operation; If the processor receives the new control information, it reads each control information stored in the first memory and uses the new control information as the target control information; If the target control information and any of the control information in the first memory are mutually exclusive, the target control information is not written into the first memory; If the control object in the target control information is consistent with the control object in any of the control information, the control information in the first memory is changed to the target control information.

7. The external chip control method of a processor according to any one of claims 2 to 6, It is characterized in that The step of encapsulating each register information into a communication frame comprises: Determine the external chip corresponding to each register information; If the external chips corresponding to the various register information are consistent, the various register information are packaged into the same communication frame.

8. An external chip control architecture for a processor, It is characterized in that Applied to a processor, the processor is externally connected to multiple external chips, the processor is provided with a first memory and a second memory, and each of the external chips is provided with multiple registers, including: The logic layer is used to receive control information, wherein the control information includes a control object and a control instruction; The first memory is used to store the control information; A control layer, used for periodically reading the control information in the first memory, and parsing each of the control information to determine the external chip matching each of the control objects, and the register information of the external chip matching each of the control instructions, wherein the register information includes the register to be controlled and the register value; The second memory is used to store the register information; The communication layer is used to read the register information from the second memory at a preset time interval, encapsulate each register information into a communication frame, and transmit the communication frame to the corresponding external chip in a full-duplex communication mode, so that the external chip controls the register to be controlled according to the register value.

9. An electronic device, It is characterized in that include: processor, memory, and communications bus; The communication bus is used to connect the processor and the memory; The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program is used to make a computer execute the method according to any one of claims 1 to 7.