Chips, networking systems and electronic devices

By using storage units and execution units in the target node to process the instructions issued by the main node, the shortcomings of CAN bus and traditional Ethernet communication in on-board data transmission are solved, efficient task execution and flexible node interconnection are achieved, and the system is reduced Cost and delay.

CN118519688BActive Publication Date: 2024-11-15SHENZHEN GOODIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410981710.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-15
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

In the existing vehicle data transmission solution, the CAN bus cannot meet the requirements of transmission rate and delay. Traditional Ethernet communication is costly and complex, and cannot support flexible node interconnection and complex communication structures. The microcontroller unit needs to handle tasks. Storage and reporting result in long response time.

Method used

Design a chip that includes storage unit, control unit and execution unit to store and parse instructions issued by the master node in the target node, and execute tasks according to the instruction type, replacing traditional MCUs, realizing remote control and real-time processing, reducing Data transmission and processing delay.

Benefits of technology

It improves the efficiency and response speed of task execution, reduces system costs, supports more flexible node interconnection and complex communication structures, and reduces data transmission and processing delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519688B_ABST
    Figure CN118519688B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a chip, a networking system and an electronic device, the chip is applied to a target node included in the networking system, the networking system includes multiple connected nodes, the multiple nodes include a main node and at least one sub-node, the target node is any one of the multiple nodes, the chip includes: a storage unit, a control unit and an execution unit; the storage unit is used to store the instructions to be executed issued by the main node in the networking system; the control unit is used to read the instructions to be executed from the storage unit, parse the instructions to be executed, obtain the instruction type of the instructions to be executed, and send the instruction type of the instructions to be executed to the execution unit; the execution unit is used to execute the instructions to be executed according to the instruction type of the instructions to be executed. The application of the chip provided by the present application can improve the execution efficiency of the instructions to be executed issued by the central control in the execution master node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic communication technology, and in particular to a chip, a networking system and an electronic device. Background Art

[0002] Nowadays, in-vehicle devices and functions tend to be diversified, and there are multiple data transmissions in the vehicle to meet the different application scenarios of the vehicle system. At present, the mainstream solution for in-vehicle data transmission is based on Ethernet and Controller Area Network (CAN) bus transmission. However, with the development of intelligence, the CAN bus cannot meet the requirements of transmission rate and latency. At present, the in-vehicle Ethernet uses traditional switch-based communication. Although it is mature and reliable, it requires more switches to connect multiple electronic control units (Electronic Control Unit, ECU) in the car. Obviously, the cost is high and the implementation is complex. It cannot support more flexible node interconnection scenarios and the application of complex communication structures, and the transmission latency is also large.

[0003] In order to solve the above problems, at present, through the networking system, the link transmission method is adopted to transmit data from multiple nodes. The micro control units in multiple nodes can execute the tasks issued by the main control device, thereby supporting more flexible node interconnection scenarios and the application of complex communication structures.

[0004] However, when the microcontroller unit in the node processes the task sent by the master node, the program stored in the microcontroller unit is required to program the task sent by the master control device, and the master control device must be reported before and after execution, resulting in a long task response time. Summary of the invention

[0005] In view of this, embodiments of the present application provide a chip, a networking system, and an electronic device to at least partially solve the above problems.

[0006] According to a first aspect of an embodiment of the present application, a chip is provided, which is applied to a target node included in a networking system, wherein the networking system includes a plurality of connected nodes, the plurality of nodes including a main node and at least one child node, and the target node is any one of the plurality of nodes, and the chip includes: a storage unit, a control unit and an execution unit; the storage unit is used to store instructions to be executed issued by the main node; the control unit is used to read the instructions to be executed from the storage unit, parse the instructions to be executed, obtain the instruction type of the instructions to be executed, and send the instruction type of the instructions to be executed to the execution unit; the execution unit is used to execute the instructions to be executed according to the instruction type of the instructions to be executed.

[0007] In a possible implementation, the control unit is used to read the to-be-executed instruction from the storage unit according to a count value of an instruction counter, the instruction counter increases the count value periodically, and the count value increment of the instruction counter in each cycle is positively correlated with the length of the to-be-executed instruction.

[0008] In a possible implementation, the chip further includes: a temporary storage unit; the temporary storage unit is used to store source operands and destination operands in the process of the execution unit executing the instruction to be executed.

[0009] In a possible implementation manner, the temporary storage unit includes a plurality of registers, or the storage unit includes the temporary storage unit.

[0010] In one possible implementation, the execution unit includes: an operation subunit and a read-write subunit; the operation subunit is used to perform logical operations according to the instruction type of the instruction to be executed; the read-write subunit is used to read and write the temporary storage unit and / or the peripheral device connected to the target node according to the logical operation result after receiving the logical operation result of the operation subunit.

[0011] In a possible implementation, the control unit is used to determine the instruction type of the instruction to be executed according to the value of the instruction type field in the instruction to be executed, and the instruction type includes at least one of an interrupt instruction, a memory access instruction, a conditional jump instruction and a calculation instruction.

[0012] In one possible implementation, the interrupt instruction includes an interrupt status read instruction and an interrupt status write instruction; the control unit is used to send the first address in the instruction to be executed to the operator unit when the instruction to be executed is the interrupt status read instruction, so that the operator unit writes the status bit to the first address in the temporary storage unit, and when the instruction to be executed is the interrupt status write instruction, send the second address in the instruction to be executed to the temporary storage unit, and the temporary storage unit sends the source operand stored in the second address to the operator unit, so that the operator unit updates the status bit to the source operand stored in the second address in the temporary storage unit.

[0013] In a possible implementation, the memory access instruction includes a memory access read instruction and a memory access write instruction; when the instruction to be executed is the memory access read instruction, the control unit sends the third address, the first base address and the first offset in the instruction to be executed to the operator unit, and sends a read request to the read-write subunit, the operator unit determines the first peripheral address according to the first base address and the first offset, and sends the first peripheral address and the third address to the read-write subunit, the read-write subunit reads the first data from the corresponding peripheral according to the read request and the first peripheral address, and writes the first data into the third address in the temporary storage unit. address; when the instruction to be executed is the memory access and write instruction, the control unit sends the fourth address in the instruction to be executed to the temporary storage unit, and sends the second base address and the second offset in the instruction to be executed to the operator unit, and sends a write request to the read-write subunit, the temporary storage unit sends the second data stored in the fourth address to the operator unit, the operator unit determines the second peripheral address according to the second base address and the second offset, and sends the second data and the second peripheral address to the read-write subunit, and the read-write subunit writes the second data into the peripheral corresponding to the second peripheral address according to the write request.

[0014] In a possible implementation, when the instruction to be executed is the conditional jump instruction, the control unit sends the fifth address in the conditional jump instruction to the temporary storage unit, and sends the immediate number in the conditional jump instruction to the operator unit, the temporary storage unit sends the third data stored in the fifth address to the operator unit, the operator unit determines whether the third data meets the condition, and if the condition is met, determines the first target count value of the instruction counter according to the immediate number, and sends the first target count value to the control unit, and the control unit reads the instruction to be executed corresponding to the first target count value from the temporary storage unit according to the first target count value.

[0015] In a possible implementation, the calculation instruction includes a shift instruction and a numerical calculation instruction; when the instruction to be executed is the shift instruction, the control unit sends the sixth address in the instruction to be executed to the temporary storage unit, and sends the immediate number in the instruction to be executed to the operator unit, the temporary storage unit sends the fourth data stored in the sixth address to the operator unit, the operator unit performs an arithmetic shift or a logical shift on the fourth data through the immediate number to obtain fifth data, and sends the fifth data and the sixth address to the read-write subunit, and the read-write subunit writes the fifth data to the sixth address of the temporary storage unit, or When the instruction to be executed is a numerical calculation instruction, the control unit sends the seventh address and the eighth address in the instruction to be executed to the temporary storage unit, and the temporary storage unit sends the sixth data stored in the seventh address and the shift value stored in the eighth address to the operator unit, and the operator unit performs arithmetic shift or logical shift on the sixth data by the shift value to obtain the seventh data, and sends the seventh data and the seventh address to the read-write subunit, and the read-write subunit writes the seventh data to the seventh address of the temporary storage unit; when the instruction to be executed is a numerical calculation instruction, the control unit sends the ninth address in the instruction to be executed to the temporary storage unit, and writes the ninth address in the instruction to be executed to the temporary storage unit. The immediate number in the execution instruction is sent to the operator unit, the temporary storage unit sends the eighth data stored at the ninth address to the operator unit, the operator unit performs arithmetic operation on the eighth data and the immediate number to obtain ninth data, and sends the ninth data and the ninth address to the read-write subunit, the read-write subunit writes the ninth data to the ninth address of the temporary storage unit, or the control unit sends the tenth address and the eleventh address in the instruction to be executed to the temporary storage unit, the temporary storage unit sends the tenth data stored at the tenth address and the eleventh data stored at the eleventh address to the operator unit, the operator unit performs arithmetic operation on the eighth data and the immediate number to obtain ninth data, and sends the ninth data and the ninth address to the read-write subunit, the read-write subunit writes the ninth data to the ninth address of the temporary storage unit. The tenth data and the eleventh data are logically operated to obtain the twelfth data, and the twelfth data and the tenth address are sent to the read-write subunit, and the read-write subunit writes the twelfth data to the tenth address of the temporary storage unit, or the control unit sends the thirteenth address in the instruction to be executed to the temporary storage unit, and sends the twelfth address in the instruction to be executed to the operation subunit, the temporary storage unit sends the thirteenth data stored in the thirteenth address to the operation subunit, the operation subunit sends the thirteenth data and the twelfth address to the read-write subunit, and the read-write subunit writes the thirteenth data to the twelfth address of the temporary storage unit.

[0016] In a possible implementation, the control unit is used to read an unconditional jump instruction and an unconditional jump and link instruction from the storage unit; when the unconditional jump instruction is read, the control unit reads from the storage unit, according to an immediate number in the unconditional jump instruction, an instruction to be executed corresponding to a second target count value of the instruction counter indicated by the immediate number, or, according to a first jump value stored in a fourteenth address in the unconditional jump instruction, the control unit reads from the storage unit an instruction to be executed corresponding to a third target count value of the instruction counter indicated by the first jump value; when the unconditional jump instruction is read, When a jump and link instruction is issued, the control unit sends the count value of the instruction counter corresponding to the unconditional jump and link instruction to the read-write subunit, and the read-write subunit writes the count value of the instruction counter into the temporary storage unit. The control unit reads the to-be-executed instruction corresponding to the fourth target count value of the instruction counter indicated by the immediate number from the storage unit according to the immediate number in the unconditional jump and link instruction, or the control unit reads the to-be-executed instruction corresponding to the fifth target count value of the instruction counter indicated by the second jump value from the storage unit according to the second jump value stored in the fifteenth address in the unconditional jump instruction.

[0017] In one possible implementation, the control unit includes: a reading subunit and a parsing subunit; the reading subunit is used to read the instructions to be executed from the storage unit and send the instructions to be executed to the parsing subunit; the parsing subunit is used to parse the instructions to be executed, obtain the instruction type of the instructions to be executed, and send the instruction type of the instructions to be executed to the execution unit.

[0018] According to the second aspect of the embodiment of the present application, a networking system is provided, comprising: a plurality of connected nodes, the plurality of nodes comprising a main node and at least one child node, a target node among the plurality of nodes comprising the chip as described in the first aspect of the embodiment of the present application, and the target node being any one of the plurality of nodes.

[0019] According to a third aspect of the embodiments of the present application, an electronic device is provided, including: the chip as described in the first aspect of the embodiments of the present application.

[0020] According to the chip provided in the embodiment of the present application, the chip is set in the target node, and the chip includes a storage unit, a control unit and an execution unit. The storage unit can store the instructions to be executed issued by the main node, and the control unit can parse the instructions to be executed to determine the instruction type, so that the instructions to be executed can be executed by the execution unit according to the instruction type to complete the task issued by the central control. Since the chip is set in the target node and the chip can execute the task issued by the central control, the MCU set in the node in the prior art can be replaced in the target node, that is, the sub-node does not need to set an MCU additionally, and is directly controlled by the central control of the main node. Remote control of sub-nodes is achieved through networking links connecting nodes, or some response tasks are processed by the sub-nodes themselves in real time. Since the instructions to be executed are directly received from the main node through the storage unit, there is no need to convert the task requirements issued by the central control through the program stored in the non-volatile memory, thereby improving the efficiency of determining the instructions to be executed. Since the instructions to be executed can be executed through the chip, there is no need to report to the central control in the main node through the link, which reduces the delay in data transmission and processing, and can improve the efficiency of processing the instructions to be executed, so that the efficiency of processing the tasks issued by the central control through the chip is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0022] Figure 1 is a schematic diagram of a networking system provided in an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of another networking system provided in an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of a chip provided in an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of a chip including a temporary storage unit provided in an embodiment of the present application;

[0026] Figure 5 is a schematic diagram of a chip including a computing subunit and a reading / writing subunit provided in an embodiment of the present application;

[0027] Figure 6 is a schematic diagram of another chip including a computing subunit and a reading / writing subunit provided in an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of an instruction to be executed whose instruction type is an interrupt instruction provided in an embodiment of the present application;

[0029] Figure 8 It is a schematic diagram of an instruction to be executed whose instruction type is a memory access instruction provided in an embodiment of the present application;

[0030] Fig. 9 It is a schematic diagram of an instruction to be executed whose instruction type is a conditional jump instruction provided in an embodiment of the present application;

[0031] Fig.10 is a schematic diagram of an instruction to be executed whose instruction type is a shift instruction provided in an embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of an instruction to be executed whose instruction type is a numerical calculation instruction provided in an embodiment of the present application;

[0033] Fig.12 is a schematic diagram of another instruction to be executed provided in an embodiment of the present application;

[0034] Fig.13 It is a schematic diagram of an unconditional jump instruction and an unconditional jump and link instruction provided in an embodiment of the present application;

[0035] Fig.14 It is a schematic diagram of a chip including a reading subunit and an analyzing subunit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0037] As mentioned above, the equipment and functions on board the vehicle tend to be diversified, and there are multiple data transmissions in the vehicle to meet the different application scenarios of the vehicle system. At present, the mainstream solution for vehicle data transmission is based on Ethernet and Controller Area Network (CAN) bus transmission. However, with the development of intelligence, the CAN bus cannot meet the requirements of transmission rate and delay, and the current in-vehicle Ethernet uses traditional switch-based communication. Although it is mature and reliable, it requires more switches to connect multiple electronic control units (ECU) in the car. Obviously, the cost is high and the implementation is complex. It cannot support more flexible node interconnection scenarios and the application of complex communication structures, and the transmission delay is also large. In order to solve the above problems, at present, through the networking system, the link transmission method is adopted to transmit data through a link composed of multiple nodes. The micro control units in multiple nodes can execute the tasks issued by the main control device, thereby supporting more flexible node interconnection scenarios and the application of complex communication structures. However, when the microcontrollers in multiple nodes process the tasks sent by the master node, the program stored in the microcontrollers needs to program the tasks sent by the master device, and the master device needs to be reported before and after execution, resulting in a long task response time. In addition, multiple nodes contain microcontrollers, resulting in a high cost for the overall system. The microcontroller is, for example, a microcontroller unit (MCU).

[0038] In an embodiment of the present application, a chip is provided, and the chip is set in a target node. The chip includes a storage unit, a control unit, and an execution unit. The storage unit can store instructions to be executed issued by the master node, and the control unit can parse the instructions to be executed to determine the instruction type, so that the instructions to be executed can be executed by the execution unit according to the instruction type to complete the task issued by the central control. Since the chip is set in the target node and the chip can execute the task issued by the central control, the MCU set in the node in the prior art can be replaced in the target node, that is, the sub-node does not need to set an additional MCU, and is directly controlled by the central control of the master node. Remote control of sub-nodes is achieved through networking links connecting nodes, or some response tasks are processed by the sub-nodes themselves in real time. Since the instructions to be executed are directly received from the main node through the storage unit, there is no need to convert the task requirements issued by the central control through the program stored in the non-volatile memory, thereby improving the efficiency of determining the instructions to be executed. Since the instructions to be executed can be executed through the chip, there is no need to report to the central control in the main node through the link, which reduces the delay in data transmission and processing, and can improve the efficiency of processing the instructions to be executed, so that the efficiency of processing the tasks issued by the central control through the chip is higher.

[0039] The chip provided by the present application is described below by way of examples.

[0040] In order to facilitate the description of the chip provided in the embodiment of the present application, the networking system is first described. Figure 1 is a schematic diagram of a networking system provided in an embodiment of the present application, Figure 2 is a schematic diagram of another networking system provided in an embodiment of the present application, such as Figure 1 and Figure 2 As shown, the networking system includes: multiple nodes connected, the multiple nodes may include a main node and at least one sub-node, the main node and each sub-node are connected in sequence to form a link, the main node can send data to each sub-node through the data packets transmitted in sequence in the link, and can also collect data from each sub-node through the data packets transmitted in sequence in the link. The sub-node can receive the data packets transmitted in sequence in the link and process them according to the data packets.

[0041] Compared with the sub-node, the master node also includes a central control, such as an MCU or a central processing unit (CPU), so as to implement functions such as issuing instructions to the sub-nodes and controlling them. Therefore, the master node is usually a master control device and the sub-node is usually a slave device.

[0042] The sub-node or the main node can be connected to at least one external device. The main node and one sub-node or multiple sub-nodes can be connected via a physical transmission medium, such as a shielded twisted pair, an unshielded twisted pair, a coaxial cable, etc.

[0043] Optionally, the external devices connected to the above-mentioned sub-nodes or main nodes include Local Interconnect Network (LIN) bus external devices, Pulse Width Modulation (PWM) drive devices, Inter-Integrated Circuit (I2C) bus external devices, Serial Peripheral lnterface (SPI) bus external devices, Quad Serial Peripheral Interface (QSPI) bus external devices, General-purpose input / output port (GPIO) external devices, Ethernet external devices, Controller Area Network (CAN) bus external devices, Media Independent Interface (MII) and various extensions and derivative versions of Media Independent Interface external devices, Universal Asynchronous Receiver / Transmitter (UART) external devices, Single Edge Nibble Transmission (SENT) bus external devices, Peripheral Sensor Interface 5 (Peripheral Sensor Interface 5, PSI5) protocol external devices, integrated circuit built-in audio bus (Inter-IC Sound, I2S) external devices, time-division multiplexing (Time-Division Multiplexing, TDM) external devices, analog microphone (Analog Microphone, AMIC) external devices, digital microphone (Digital Microphone, DMIC) external devices and analog-to-digital converter (Analog-to-digital converter, ADC) external devices. The embodiments of the present application do not limit the specific types of external devices.

[0044] It should be understood that Figure 1 A topology example of a networking system is shown in FIG. The master node may include the chip 100 provided in the present application. The MCU or CPU in the master node and the chip 100 provided in the present application together constitute the central control in the master node, while the sub-node may only include the chip 100 in the present application, and the MCU does not need to be set. It should also be understood that Figure 1 Only a solution with one master node and one sub-node is shown, but the topology of the networking system is not limited to this. For example: Figure 2 As shown, Figure 2 (a) shows a scheme where a master node and multiple sub-nodes form a ring chain. Figure 2 (b) shows a solution in which a master node and multiple sub-nodes form a daisy chain. In addition, the networking system may also include other topology networking systems, and the specific structure of the embodiment of the application is not limited.

[0045] Figure 3 is a schematic diagram of a chip provided in an embodiment of the present application, such as Figure 3 As shown, the chip 100 includes a storage unit 101, a control unit 102 and an execution unit 103. The storage unit 101 can store instructions to be executed issued by a master node in a networking system. The control unit 102 can read the instructions to be executed from the storage unit 101, parse the instructions to be executed, obtain the instruction type of the instructions to be executed, and send the instruction type of the instructions to be executed to the execution unit 103. The execution unit 103 can execute the instructions to be executed according to the instruction type of the instructions to be executed.

[0046] like Figure 3 The chip 100 shown can be applied to a target node in a networking system, and the target node can be any node in the networking system, for example: Figure 1 and Figure 2 The main node and / or sub-node in the networking system shown in FIG. 1 , it should be understood that any node in the networking system can be provided with the chip 100 , and the specific number of settings can be set as required.

[0047] The chip 100 includes a storage unit 101, a control unit 102 and an execution unit 103. The storage unit 101 can store the instructions to be executed issued by the master node in the networking system. The instructions to be executed are binary data encoded according to a preset encoding rule. The instructions to be executed are generated and issued by the central control in the master node and can be directly or indirectly transmitted to the chip 100 in the target node. In one example, the instructions to be executed can be sent directly to the target node by the master node through an I2C or SPI bus, for example: Figure 1 In the structure shown in , the target node is child node A, and the instruction to be executed can be directly sent from the master node to child node A. In another example, the instruction to be executed can be issued by the master node and forwarded to the target node through other nodes, for example: Figure 1 In the structure shown in , the target node is child node E, then the instruction to be executed can be sent from the main node to child node G, then from child node G to child node F, and then from child node F to child node E. The storage unit 101 can be a memory with a storage function, such as a static random access memory (SRAM), a random access memory (RAM), etc.

[0048] The control unit 102 in the chip 100 can read the instructions to be executed stored in the storage unit 101. In one example, the control unit 102 can read the instructions to be executed stored in the storage unit 101 periodically, for example, reading the instructions to be executed once every 10 ms. After the control unit 102 reads the instructions to be executed in the storage unit 101, it parses the instructions to be executed and determines the instruction type of the instructions to be executed. The instruction type can represent the instruction operation logic of the instructions to be executed, for example, reading and writing registers, reading and writing memory, numerical operations, etc. After the control unit 102 parses the instruction type, it sends the instruction type to the execution unit 103. It should be understood that the analysis result of the instructions to be executed by the control unit 102 includes at least the instruction type, and can also include relevant data of the corresponding execution type, which is again not limited.

[0049] The execution unit 103 may execute the instruction to be executed according to the instruction type parsed by the parsing unit. For example, the execution unit 103 may perform read and write register operations, read and write peripheral 200 memory operations, etc. according to the instruction type.

[0050] Optionally, the chip 100 may also include a transceiver unit, which can receive instructions or data sent by an adjacent node (for example, a master node or a child node) of the target node, and then store the instructions or data in the storage unit 101, or the transceiver unit can send the data obtained after the execution unit 103 executes (or some data that needs to be reported) to the adjacent node (for example, a master node or a child node) to realize data transmission.

[0051] In the embodiment of the present application, a chip 100 is provided in the target node, and the chip 100 includes a storage unit 101, a control unit 102 and an execution unit 103. The storage unit 101 can store the instructions to be executed issued by the central control of the master node, and the control unit 102 can parse the instructions to be executed to determine the instruction type, so that the instructions to be executed can be executed according to the instruction type by the execution unit 103 to complete the task issued by the central control. Since the chip 100 is provided in the target node and the chip 100 can execute the task issued by the central control, the MCU set in the node in the prior art can be replaced in the target node, that is, the child node does not need to set an additional MCU, and can directly execute the task issued by the central control. The central control of the main node can remotely control the sub-nodes through the networking links between the nodes, or the sub-nodes themselves can process some response tasks in real time. Since the instructions to be executed issued by the main node are directly received through the storage unit 101, there is no need to convert the instructions for the task requirements issued by the main control device through the program stored in the non-volatile memory, thereby improving the efficiency of determining the instructions to be executed. Since the instructions to be executed can be executed through the chip 100, there is no need to report to the central control in the main node through the link, which reduces the delay in data transmission and processing, and can improve the efficiency of processing the instructions to be executed, so that the efficiency of processing the tasks issued by the central control through the chip 100 is higher.

[0052] In a possible implementation, the control unit 102 may read the instruction to be executed from the storage unit 101 according to the count value of the instruction counter, the instruction counter increases the count value periodically, and the count value increment of the instruction counter in each cycle is positively correlated with the length of the instruction to be executed.

[0053] An instruction counter may be provided in the control unit 102. In one example, the instruction counter may be a register. The count value of the instruction counter increases in cycles, that is, a certain count value increment is added in each cycle, and the count value increment is positively correlated with the length of the instruction to be executed. For example, the count value increment may be linearly related to the length of the instruction to be executed. In one example, the count value increment may be equal to the ratio of the length of the instruction to be executed and 8. For example, if the length of the instruction to be executed is 16 bytes, the count value increment may be 2, that is, 16 / 8. If the length of the instruction to be executed is 32 bytes, the count value increment may be 4, that is, 32 / 8. It should be understood that 8 bytes is 1 byte, and the number of bytes of the instruction to be executed is determined as the count value increment in units of 8 bytes.

[0054] The following is a specific explanation using an example. When the count value of the instruction counter is 2, the control unit 102 reads the data of the first byte and the second byte from the storage unit 101. After one cycle, the count value of the instruction counter becomes 4, and the control unit 102 reads the data of the third byte and the fourth byte from the storage unit 101. It should be understood that the above is only provided as an example and should not limit the embodiments of the present application in any way.

[0055] In an embodiment of the present application, the control unit 102 can read the instructions to be executed from the storage unit 101 according to the count value of the instruction counter, so that the control unit 102 can periodically read the instructions to be executed stored in the storage unit 101 and issued by the master node. Since the control unit 102 reads the instructions to be executed according to the count value of the instruction counter that increases periodically, it can prevent the control unit 102 from missing some instructions when reading the instructions to be executed, and the instructions to be executed issued by the master node can be received and processed by the chip 100, thereby improving the practicality of the chip 100.

[0056] In a possible implementation, the chip 100 further includes a temporary storage unit 104 , which can store source operands and destination operands when the execution unit 103 executes the instruction to be executed.

[0057] The chip 100 also includes a temporary storage unit 104, which can store source operands and destination operands generated by the execution unit 103 during the execution of the instruction to be executed. It should be understood that the source operand usually refers to data that needs to be processed. When the execution unit 103 executes the instruction to be executed, the source operand is provided to the execution unit 103 for operation. The destination operand is the result after the instruction is executed, which can be obtained by the execution unit 103 performing a logical operation on the source operand.

[0058] In an embodiment of the present application, the chip 100 also includes a temporary storage unit 104, so that the temporary storage unit 104 can store data that needs to be read when the execution unit 103 executes the instruction to be executed, that is, the source operand, and store the data generated after the execution unit 103 executes the instruction to be executed, that is, the destination operand. Therefore, the execution unit 103 can execute the instruction to be executed and store the execution result, thereby ensuring that the chip 100 can normally execute the instruction to be executed issued by the main node.

[0059] In a possible implementation, the temporary storage unit 104 includes a plurality of registers, or the storage unit 101 includes the temporary storage unit 104 .

[0060] The temporary storage unit 104 can be Figure 3 The storage unit 101 in Figure 3 The storage unit 101 in stores the source operand and the destination operand, Figure 4 is a schematic diagram of a chip including a temporary storage unit provided in an embodiment of the present application, such as Figure 4 As shown, the temporary storage unit 104 may be a plurality of registers set in the chip 100, for example: Figure 4 In registers 1 to n, in one example, the registers may include a status register and an operand register. The status register may be used to store the chip 100 status and the peripheral 200 status, etc., and the operand register may be used to store data such as source operands and destination operands.

[0061] In the embodiment of the present application, the storage unit 101 includes a temporary storage unit 104, thereby allowing part of the memory to be used as the temporary storage unit 104, and there is no need to set up additional registers, thereby reducing costs. The temporary storage unit 104 can also be a plurality of registers. Therefore, compared with the above-mentioned solution in which the storage unit 101 includes the temporary storage unit 104, since the read and write speed of the register is greater than the read and write speed of the storage unit 101, the data read and write efficiency can be improved, and the delay in data transmission and processing can be reduced.

[0062] Figure 5 is a schematic diagram of a chip including a computing subunit and a reading and writing subunit provided in an embodiment of the present application, such as Figure 5 As shown, the execution unit 103 includes an operation subunit 1031 and a read-write subunit 1032. The operation subunit 1031 can perform logical operations according to the instruction type of the instruction to be executed. After receiving the logical operation result of the operation subunit 1031, the read-write subunit 1032 can read and write the temporary storage unit 104 and / or the peripheral device 200 connected to the target node according to the logical operation result.

[0063] The execution unit 103 includes an operator unit 1031. The operator unit 1031 can perform logic operations according to the type of the instruction to be executed, such as arithmetic operations, logical shifts, arithmetic shifts, etc. In one example, the operator unit 1031 can perform logic operations according to the source operands, immediate numbers, etc. in the instruction to be executed to obtain the destination operand. In one example, the operator unit 1031 can be an arithmetic and logic unit (ALU), which is a combinational logic circuit that can implement multiple groups of arithmetic operations and logic operations.

[0064] The execution unit 103 also includes a read-write subunit 1032. After receiving the logic operation result of the operation subunit 1031, the read-write subunit 1032 can read and write the temporary storage unit 104, for example, the logic operation result can be written into the temporary storage unit 104, or the data in the temporary storage unit 104 can be read out and written into the peripheral device 200. The read-write subunit 1032 can also read and write to the peripheral device 200, for example, the logic operation result output by the operation subunit 1031 is written into the memory or register of the peripheral device 200, or according to the logic operation result of the operation subunit 1031, data is read from the peripheral device 200 and written into the temporary storage unit 104. In one example, the read-write subunit 1032 can be a load store unit 101 (Load Store Unit, LSU), and the temporary storage unit 104 and / or the peripheral device 200 connected to the target node can be read and written through the LSU.

[0065] In one example, Figure 6 is a schematic diagram of another chip including a computing subunit and a reading and writing subunit provided in an embodiment of the present application, such as Figure 6 The operator unit 1031 shown may include an IRQ_STATUS status register 10311, which is connected to the interrupt of the peripheral device 200 of the target node, so that the interrupt status of the peripheral device 200 can be queried or modified, for example: modifying the interrupt status of the peripheral device 200, or writing the interrupt status of the peripheral device 200 into the temporary storage unit 104, etc.

[0066] In an embodiment of the present application, the execution unit 103 includes an operation subunit 1031 and a read-write subunit 1032. The operation subunit 1031 can perform logical operations according to the instruction type, and the read-write subunit 1032 can read and write to the peripheral 200 and / or the temporary storage subunit, thereby executing the instructions to be executed and realizing the relevant functions of the execution unit 103. Since the instructions to be executed are executed by the chip 100, there is no need to report to the central control in the main node through the link, which can improve the efficiency of processing the instructions to be executed, so that the chip 100 has a higher efficiency in processing the tasks issued by the central control, and reduces the delay in data transmission and processing.

[0067] In a possible implementation, the control unit 102 may determine the instruction type of the instruction to be executed according to the value of the instruction type field in the instruction to be executed, where the instruction type includes at least one of an interrupt instruction, a memory access instruction, a conditional jump instruction, and a calculation instruction.

[0068] The instruction to be executed includes an instruction type field. When the control unit 102 parses the instruction to be executed, it can determine the instruction type of the instruction to be executed according to the instruction type field in the instruction to be executed, such as: interrupt instruction, memory access instruction, conditional jump instruction and calculation instruction.

[0069] In one example, the parsing result of the instruction to be executed is 16-byte data, where the 1st byte and the 2nd byte can indicate the main category of instruction type, such as: interrupt instruction, memory access instruction, conditional jump instruction and calculation instruction, and the 14th byte, the 15th byte and the 16th byte can indicate the specific operations corresponding to the main category of instruction type indicated by the 1st byte and the 2nd byte, such as: addition and subtraction logical operations in calculation instructions, read instructions and write instructions of interrupt instructions, etc.

[0070] In an embodiment of the present application, the control unit 102 can determine the instruction type of the instruction to be executed based on the value of the instruction type field in the instruction to be executed, thereby parsing the execution type of the instruction to be executed, so that the operation unit can process the instruction to be executed according to the instruction type.

[0071] In one possible implementation, the interrupt instruction includes an interrupt status read instruction and an interrupt status write instruction. The control unit 102 can send the first address in the instruction to be executed to the operator unit 1031 when the instruction to be executed is an interrupt status read instruction, so that the operator unit 1031 writes the status bit to the first address in the temporary storage unit 104, and when the instruction to be executed is an interrupt status write instruction, the control unit 102 can send the second address in the instruction to be executed to the temporary storage unit 104, and the temporary storage unit 104 sends the source operand stored in the second address to the operator unit 1031, so that the operator unit 1031 updates the status bit to the source operand stored in the second address in the temporary storage unit 104.

[0072] The interrupt instruction includes an interrupt status read instruction and an interrupt status write instruction. The interrupt status read instruction is to read the interrupt status of the peripheral 200, for example: read the interrupt status of the peripheral 200 stored in the IRQ_STATUS status register 10311. The interrupt status write instruction is to update the interrupt status bit, for example: update the interrupt status of the peripheral 200 stored in the IRQ_STATUS status register 10311.

[0073] The following is a specific example to illustrate how to execute an interrupt instruction.

[0074] In one example, Figure 7 is a schematic diagram of an instruction to be executed whose instruction type is an interrupt instruction provided in an embodiment of the present application, such as Figure 7 As shown, the instruction to be executed can be a 16-byte instruction. Figure 72 instructions to be executed are shown in FIG. 1 . The op=11 in the first instruction to be executed indicates that the instruction is an interrupt instruction, and funct3=000 indicates that the instruction to be executed is an interrupt status read instruction. The op=11 in the second instruction to be executed indicates that the instruction is an interrupt instruction, and funct3=001 indicates that the instruction to be executed is an interrupt status write instruction. For the first instruction to be executed, the control unit 102 parses that the instruction to be executed is an interrupt status read instruction. The control unit 102 resolves the first address to The interrupt status bit is sent to the operation subunit 1031, and the operation subunit 1031 writes the read interrupt status bit to the first address in the temporary storage unit 104 For example, the interrupt status of the peripheral device 200 stored in the IRQ_STATUS status register is written to the first address in the temporary storage unit 104. For the second pending instruction, the second pending instruction The control unit 102 resolves the second address to The temporary storage unit 104 sends the second address The source operand stored in is sent to the operator unit 1031, and the operator unit 1031 can update the interrupt status bit to the second address The source operand in the IRQ_STATUS register is modified to the second address. The data stored in is 0.

[0075] It should be noted that, since the instruction type of the to-be-executed instruction is an interrupt instruction, it only needs to include the instruction type field and the first address or the second address, and the to-be-executed instruction is a 16-byte instruction, Figure 7 As shown, in the interrupt instruction, except for the instruction type field and the first address or the second address, all other fields are padded with 0 as redundant bits.

[0076] In an embodiment of the present application, when the control unit 102 parses that the instruction to be executed is an interrupt instruction, if the instruction to be executed is an interrupt status read instruction, the operator unit 1031 writes the interrupt status bit into the temporary storage unit 104; if the instruction to be executed is an interrupt status write instruction, the operator unit 1031 updates the interrupt status bit to the source operand stored at the second address in the temporary storage unit 104, thereby realizing the query and modification of the interrupt status of the peripheral 200 stored in the operator unit 1031. Since there is no need to report to the central control in the main node when querying and modifying the interrupt status bit, there is no need to report to the central control of the main node through the link. Therefore, the processing speed of the interrupt instruction is faster, the processing efficiency of the instruction to be executed is improved, and the delay of data transmission and processing is reduced.

[0077] In one possible implementation, the memory access instruction includes a memory access read instruction and a memory access write instruction. When the instruction to be executed is a memory access read instruction, the control unit 102 sends the third address, the first base address and the first offset in the instruction to be executed to the operator unit 1031, and sends a read request to the read-write subunit 1032. The operator unit 1031 determines the first peripheral address according to the first base address and the first offset, and sends the first peripheral address and the third address to the read-write subunit 1032. The read-write subunit 1032 reads the first data from the corresponding peripheral 200 according to the read request and the first peripheral address, and writes the first data to the third address in the temporary storage unit 104.

[0078] When the instruction to be executed is a memory access and write instruction, the control unit 102 sends the fourth address in the instruction to be executed to the temporary storage unit 104, and sends the second base address and the second offset in the instruction to be executed to the operator unit 1031, and sends a write request to the read-write subunit 1032, the temporary storage unit 104 sends the second data stored in the fourth address to the operator unit 1031, the operator unit 1031 determines the second peripheral address according to the second base address and the second offset, and sends the second data and the second peripheral address to the read-write subunit 1032, and the read-write subunit 1032 writes the second data into the peripheral 200 corresponding to the second peripheral address according to the write request.

[0079] Memory access instructions may include memory read instructions and memory write instructions. Executing a memory read instruction can read the memory or register of the peripheral device 200 and write the read data to the temporary storage unit 104. Executing a memory write instruction can write the data of the temporary storage unit 104 to the memory or register of the peripheral device 200.

[0080] The following is a specific example to illustrate how to execute a memory access instruction.

[0081] Figure 8 is a schematic diagram of an instruction to be executed whose instruction type is a memory access instruction provided in an embodiment of the present application, such as Figure 8 As shown, the instruction to be executed can be a 16-byte instruction. Figure 8 2 instructions to be executed are shown in FIG. 1 . The op=00 in the first instruction to be executed indicates that the instruction is a memory access instruction, and funct3=010 indicates that the instruction to be executed is a memory access read instruction. The op=00 in the second instruction to be executed indicates that the instruction is a memory access instruction, and funct3=110 indicates that the instruction to be executed is a memory access write instruction. For the first instruction to be executed, the control unit 102 parses that the instruction to be executed is a memory access read instruction. That is, the first base address in the peripheral 200, That is, the third address, the control unit 102 resolves the first base address and the first offset ( Figure 8 The immediate value imm in the first instruction to be executed in the instruction is sent to the operator unit 1031, and the operator unit 1031 is based on the first base address and the first offset, determine the first peripheral address in the peripheral 200, and convert the first peripheral address and the third address The first data is sent to the read-write subunit 1032, and the read-write subunit 1032 reads the first data from the first peripheral address and writes the first data into the third address in the temporary storage subunit. In the process, the memory access read instruction is completed.

[0082] For the second instruction to be executed, the control unit 102 parses the instruction to be executed to find that the instruction to be executed is a memory access and write instruction. That is the second base address in the peripheral 200, That is, the fourth address. The control unit 102 resolves the fourth address The temporary storage unit 104 sends the fourth address The second data stored in the second base address is sent to the operator unit 1031, and the control unit 102 resolves the second base address and the second offset ( Figure 8 The immediate value imm in the second instruction to be executed in the instruction is sent to the operator unit 1031, and the operator unit 1031 is based on the second base address and the second offset, determine the second peripheral address in the peripheral 200, and send the second peripheral address and the second data to the read-write subunit 1032, the read-write subunit 1032 writes the second data into the second peripheral address in the peripheral 200, and completes the memory access and write instruction.

[0083] In an embodiment of the present application, memory access instructions include memory access read instructions and memory access write instructions. The control unit 102 can send the base address and offset in the instruction to be executed to the operator unit 1031, so that the operator unit 1031 can determine the peripheral address in the peripheral 200 according to the base address and the offset, so that the read and write operations can be performed on the peripheral 200 according to the peripheral address, thereby realizing the writing of data in the peripheral 200 into the temporary storage unit 104 or the writing of data in the temporary storage unit 104 into the peripheral 200. Since there is no need to report to the central control in the main node when reading and writing the peripheral 200, there is no need to report to the central control of the main node through the link. Therefore, the processing speed of the memory access instruction is faster, the processing efficiency of the instruction to be executed is improved, and the delay of data transmission and processing is reduced.

[0084] In one possible implementation, when the instruction to be executed is a conditional jump instruction, the control unit 102 sends the fifth address in the conditional jump instruction to the temporary storage unit 104, and sends the immediate number in the conditional jump instruction to the operator unit 1031, the temporary storage unit 104 sends the third data stored in the fifth address to the operator unit 1031, the operator unit 1031 determines whether the third data meets the condition, and if the condition is met, determines the first target count value of the instruction counter according to the immediate number, and sends the first target count value to the control unit 102, and the control unit 102 reads the instruction to be executed corresponding to the first target count value from the temporary storage unit 104 according to the first target count value.

[0085] The instructions to be executed may include conditional jump instructions, and the conditional jump instructions may jump to execute other instructions to be executed when a condition is met.

[0086] The following is a specific example to illustrate how to execute a conditional jump instruction.

[0087] Fig. 9 is a schematic diagram of an instruction to be executed whose instruction type is a conditional jump instruction provided in an embodiment of the present application, such as Fig. 9 As shown, the instruction to be executed can be a 16-byte instruction. Fig. 9 There are three instructions to be executed. op=01 in each instruction to be executed indicates that the instruction is a jump instruction. funct3=010, funct3=110, funct3=111 indicate different conditions, such as: greater than 0, less than 0, equal to 0, not equal to 0, etc. The control unit 102 analyzes the instruction to be executed as a conditional jump instruction and sets the fifth address to the conditional jump instruction. The temporary storage unit 104 receives the fifth address Then, the fifth address The third data stored in is sent to the operator unit 1031, and the control unit 102 sends the immediate number imm to the operator unit 1031. The operator unit 1031 determines whether the third data meets the conditions, for example: whether the third data is greater than 0, whether the third data is less than 0, etc. When the third data meets the conditions, the operator unit 1031 determines the first target count value of the instruction counter according to the immediate number, and the control unit 102 can read the to-be-executed instruction corresponding to the first target count value from the storage unit 101 according to the first target count value, and parse the to-be-executed instruction, so as to execute the to-be-executed instruction corresponding to the first target count value through the execution unit 103 to realize the conditional jump. It should be noted that when the immediate number is a positive number, it is a backward jump, and when the immediate number is a negative number, it is a forward jump. It should be understood that when the jump condition is not met, no jump is performed.

[0088] In an embodiment of the present application, when the instruction to be executed is a conditional jump instruction, the temporary storage unit 104 sends the third data in the fifth address to the operator unit 1031 according to the fifth address in the instruction to be executed parsed by the control unit 102, and the operator unit 1031 determines whether the third data satisfies the jump condition. If so, the first target count value is determined according to the immediate number in the conditional jump instruction, so that the control unit 102 can read the instruction to be executed corresponding to the first target count value from the storage unit 101, thereby realizing the instruction jump. Since there is no need to report to the central control in the main node when executing the conditional jump instruction, there is no need to report to the central control of the main node through the link, so the processing speed of the conditional jump instruction is faster, the processing efficiency of the instruction to be executed is improved, and the delay of data transmission and processing is reduced.

[0089] In a possible implementation, when the instruction to be executed is a shift instruction, the control unit 102 sends the sixth address in the instruction to be executed to the temporary storage unit 104, and sends the immediate number in the instruction to be executed to the operator unit 1031, the temporary storage unit 104 sends the fourth data stored in the sixth address to the operator unit 1031, the operator unit 1031 performs an arithmetic shift or a logical shift on the fourth data through the immediate number to obtain the fifth data, and sends the fifth data and the sixth address to the read-write subunit 1032, and the read-write subunit 1032 sends the fifth data to the operator unit 1031. The sixth address of the temporary storage unit 104 is written, or the control unit 102 sends the seventh address and the eighth address in the instruction to be executed to the temporary storage unit 104, the temporary storage unit 104 sends the sixth data stored in the seventh address and the shift value stored in the eighth address to the operator unit 1031, the operator unit 1031 performs arithmetic shift or logical shift on the sixth data by the shift value to obtain the seventh data, and sends the seventh data and the seventh address to the read-write subunit 1032, and the read-write subunit 1032 writes the seventh data into the seventh address of the temporary storage unit 104.

[0090] When the instruction to be executed is a numerical calculation instruction, the control unit 102 sends the ninth address in the instruction to be executed to the temporary storage unit 104, and sends the immediate number in the instruction to be executed to the operator unit 1031, the temporary storage unit 104 sends the eighth data stored at the ninth address to the operator unit 1031, the operator unit 1031 performs arithmetic operation on the eighth data and the immediate number to obtain the ninth data, and sends the ninth data and the ninth address to the read-write subunit 1032, the read-write subunit 1032 writes the ninth data to the ninth address of the temporary storage unit 104, or the control unit 102 sends the tenth address and the eleventh address in the instruction to be executed to the temporary storage unit 104, the temporary storage unit 104 sends the tenth data stored at the tenth address and the eleventh data stored at the eleventh address to the operator unit 1031. The operator unit 1031 performs a logical operation on the tenth data and the eleventh data to obtain the twelfth data, and sends the twelfth data and the tenth address to the read-write subunit 1032, and the read-write subunit 1032 writes the twelfth data into the tenth address of the temporary storage unit 104, or the control unit 102 sends the thirteenth address in the instruction to be executed to the temporary storage unit 104, and sends the twelfth address in the instruction to be executed to the operator unit 1031, the temporary storage unit 104 sends the thirteenth data stored in the thirteenth address to the operator unit 1031, the operator unit 1031 sends the thirteenth data and the twelfth address to the read-write subunit 1032, and the read-write subunit 1032 writes the thirteenth data into the twelfth address of the temporary storage unit 104.

[0091] The instructions to be executed may be shift instructions and numerical calculation instructions. When the instructions to be executed are shift instructions, the execution unit 103 shifts the data according to the parsing result of the control unit 102, such as arithmetic left shift, arithmetic right shift, logical left shift or logical right shift, etc. When the instructions to be executed are numerical calculation instructions, the execution unit 103 performs logical calculations on the data according to the parsing result of the control unit 102, such as addition, subtraction, etc.

[0092] The following uses multiple examples to specifically illustrate how to execute calculation instructions.

[0093] Fig.10 is a schematic diagram of an instruction to be executed whose instruction type is a shift instruction provided in an embodiment of the present application, such as Fig.10 As shown, the instruction to be executed can be a 16-byte instruction. Fig.10 Two instructions to be executed are shown in FIG. 1 . op=10 in each instruction to be executed indicates that the instruction is a calculation instruction. funct3=000 in the first instruction to be executed indicates that the calculation instruction is a shift instruction. According to different shift instructions of funct3, the shift instruction can be divided into arithmetic left shift, arithmetic right shift, logical left shift or logical right shift. That is, the sixth address. The control unit 102 parses the instruction to be executed as a shift instruction, and the control unit 102 converts the parsed sixth address The temporary storage unit 104 receives the sixth address Then, the sixth address The fourth data stored in is sent to the operator unit 1031, the control unit 102 sends the immediate number imm to the operator unit 1031, and the operator unit 1031 performs an arithmetic shift or a logical shift on the fourth data and according to the immediate number to determine the fifth data. It should be understood that the control unit 102 determines the shift mode according to funct3 in the instruction to be executed, and the far operator unit shifts according to the shift mode. For example, if funct3 in the instruction to be executed indicates an arithmetic left shift, then the far operator unit performs an arithmetic left shift on the fourth data, and funct3 in the instruction to be executed indicates Indicates a logical right shift, the far operator unit performs a logical right shift on the fourth data. For example, the fourth data is 0011011110. If funct3 indicates a logical right shift and the immediate number indicates a shift of 2 bits, the fifth data is 0000110111. If funct3 indicates a logical left shift and the immediate number indicates a shift of 2 bits, the fifth data is 1101111000. It should be understood that when an arithmetic left shift is performed, it is the same as a logical shift. When an arithmetic right shift is performed, a sign value, 0 or 1, needs to be supplemented in the vacated shift. The far operator unit replaces the fifth data and the sixth address. The data is sent to the read / write subunit 1032, and the read / write subunit 1032 can store the fifth data to the sixth address of the temporary storage unit 104. In this way, the shift instruction is implemented.

[0094] Fig.10 The second instruction in is also a shift instruction. op=10 indicates that the instruction is a calculation instruction. funct3=010 indicates that the calculation instruction is a shift instruction. According to the different shift instructions of funct3, it can be divided into arithmetic left shift, arithmetic right shift, logical left shift or logical right shift. This is the seventh address. That is, the eighth address. The control unit 102 parses the instruction to be executed as a shift instruction, and the control unit 102 converts the parsed seventh address and the eighth address The temporary storage unit 104 receives the seventh address. and the eighth address Then, the seventh address The sixth data and the eighth address stored in The stored shift value is sent to the operator unit 1031, and the operator unit 1031 performs an arithmetic shift or a logical shift on the sixth data and according to the shift value to determine the seventh data. It should be understood that the shift method for the sixth data according to the shift value is the same as the shift method in the above scheme, and the difference is only that the number of shift items is confirmed by the immediate number or by the eighth address. The stored value in determines the number of shift items. The specific shift method can be seen in the above example and will not be described here. The seventh data is sent to the read-write subunit 1032, and the read-write subunit 1032 can store the seventh data to the seventh address of the temporary storage unit 104. In this way, the shift instruction is implemented.

[0095] Fig.11 is a schematic diagram of an instruction to be executed whose instruction type is a numerical calculation instruction provided in an embodiment of the present application, such as Fig.11 As shown, op=10 in the first instruction to be executed indicates that the instruction is a calculation instruction, and funct3=100 indicates that the calculation instruction is an instruction for performing numerical calculation based on an immediate value. That is, the ninth address. The control unit 102 parses the instruction to be executed as a numerical calculation instruction, and the control unit 102 converts the ninth address to The temporary storage unit 104 sends the ninth address The eighth data stored in the address is sent to the operator unit 1031, the control unit 102 sends the immediate number imm to the operator unit 1031, the operator unit 1031 performs arithmetic operations on the eighth data and the immediate number imm, such as addition operations, subtraction operations, etc., to obtain the ninth data, and the ninth data and the ninth address of the operator unit are obtained. The ninth data is sent to the read-write subunit 1032, and the read-write subunit 1032 can store the ninth data at the ninth address. In this way, numerical calculation instructions are implemented.

[0096] Fig.11 The op=10 in the second instruction to be executed indicates that the instruction is a calculation instruction, and funct3=110 indicates that the calculation instruction is a numerical calculation instruction. This is the tenth address. That is, the eleventh address. The control unit 102 parses the instruction to be executed as an instruction to perform numerical calculation according to the stored value. The control unit 102 will parse the tenth address and the eleventh address The temporary storage unit 104 sends the tenth address The tenth data and the eleventh address stored in The eleventh data stored in the address is sent to the operator unit 1031, and the operator unit 1031 performs arithmetic operations on the tenth data and the eleventh data, such as addition operations, subtraction operations, etc., to obtain the twelfth data. The twelfth data and the tenth address of the operator unit 1031 are combined. The data is sent to the read / write subunit 1032, and the read / write subunit 1032 can store the twelfth data to the tenth address of the temporary storage unit 104. In this way, numerical calculation instructions are implemented.

[0097] Fig.11 op=10 in the third instruction to be executed indicates that the instruction is a calculation instruction, and funct3=111 indicates that the calculation instruction is an assignment calculation instruction. This is the thirteenth address. That is, the twelfth address. The control unit 102 parses the instruction to be executed as an assignment calculation instruction, and the control unit 102 converts the thirteenth address to the parsed The temporary storage unit 104 sends the thirteenth address The thirteenth data stored in the address is sent to the operator unit 1031, and the operator unit 1031 converts the twelfth address The thirteenth data is sent to the read-write subunit 1032, and the read-write subunit 1032 writes the thirteenth data to the twelfth address of the temporary storage unit 104 , complete the assignment calculation instruction.

[0098] It should be understood that Fig.12 is a schematic diagram of another instruction to be executed provided in an embodiment of the present application, Fig.12 A schematic diagram of various types of computing instructions being empty instructions is shown in FIG. Fig.12 When the instruction shown in is executed, the execution unit 103 does not execute the instruction. For example, the control unit 102 may directly discard the instruction after parsing.

[0099] In an embodiment of the present application, when the instruction to be executed is a calculation instruction, the remote operator unit performs logical operations on the parsing results of the instruction to be executed according to the control unit 102 to execute the calculation instruction. Since there is no need to report to the central control in the main node when processing the calculation instruction, there is no need to report to the central control of the main node through the link. Therefore, the processing speed of the calculation instruction is faster, the processing efficiency of the instruction to be executed is improved, and the delay of data transmission and processing is reduced.

[0100] In a possible implementation, the control unit 102 may read the unconditional jump instruction and the unconditional jump and link instruction from the storage unit 101 .

[0101] When an unconditional jump instruction is read, the control unit 102 reads the to-be-executed instruction corresponding to the second target count value of the instruction counter indicated by the immediate number from the storage unit 101 according to the immediate number in the unconditional jump instruction, or the control unit 102 reads the to-be-executed instruction corresponding to the third target count value of the instruction counter indicated by the first jump value from the storage unit 101 according to the first jump value stored in the fourteenth address in the unconditional jump instruction.

[0102] When an unconditional jump and link instruction is read, the control unit 102 sends the count value of the instruction counter corresponding to the unconditional jump and link instruction to the read-write subunit 1032, and the read-write subunit 1032 is used to write the count value of the instruction counter into the temporary storage unit 104. The control unit 102 reads the to-be-executed instruction corresponding to the fourth target count value of the instruction counter indicated by the immediate number from the storage unit 101 according to the immediate number in the unconditional jump and link instruction, or the control unit 102 reads the to-be-executed instruction corresponding to the fifth target count value of the instruction counter indicated by the second jump value from the storage unit 101 according to the second jump value stored in the fifteenth address in the unconditional jump instruction.

[0103] The storage unit 101 can also store unconditional jump instructions and unconditional jump and link instructions. When processing an unconditional jump instruction, the control unit 102 can directly jump to the instruction to be executed indicated by the immediate number or the storage value in the temporary storage unit 104 according to the unconditional jump instruction. When processing an unconditional jump and link instruction, the control unit 102 can directly jump to the instruction to be executed indicated by the immediate number or the storage value in the temporary storage unit 104 according to the unconditional jump and link instruction, and save the count value corresponding to the unconditional jump and link instruction currently being processed to the associated storage location in the temporary storage unit 104.

[0104] The following uses multiple examples to specifically illustrate how to execute unconditional jump instructions and unconditional jump and link instructions.

[0105] Fig.13 is a schematic diagram of an unconditional jump instruction and an unconditional jump and link instruction provided in an embodiment of the present application, such as Fig.13 As shown, op=01 in each instruction indicates that the instruction is a jump instruction, funct3=001 in the first instruction is an unconditional jump instruction, the control unit 102 parses that the instruction to be executed is an unconditional jump instruction, and the control unit 102 reads the instruction to be executed corresponding to the first target count value from the storage unit 101 according to the first target count value indicated by the immediate number imm, and funct3=100 in the second instruction indicates that the instruction is an unconditional jump register instruction, the control unit 102 parses that the instruction is an unconditional jump register instruction, and the control unit 102 reads the instruction to be executed corresponding to the first target count value according to the fourteenth address in the unconditional jump instruction. Read the fourteenth address from memory cell 101 The first jump value stored in the instruction counter is read from the storage unit 101 according to the third target count value of the instruction counter indicated by the first jump value.

[0106] The funct3=101 in the third instruction indicates that the instruction is an unconditional jump and link instruction. The control unit 102 parses and finds that the instruction is an unconditional jump and link instruction. After the control unit 102 stores the count value of the instruction counter corresponding to the currently processed unconditional jump and link instruction in the temporary storage unit 104, the control unit 102 reads the to-be-executed instruction corresponding to the fourth target count value from the storage unit 101 according to the fourth target count value of the instruction counter indicated by the immediate number imm. The funct3=111 in the fourth instruction indicates that the instruction is an unconditional jump register and link instruction. The control unit 102 parses and finds that the to-be-executed instruction is an unconditional jump register and link instruction. After the control unit 102 stores the count value of the instruction counter corresponding to the currently processed unconditional jump register and link instruction in the temporary storage unit 104, the control unit 102 reads the to-be-executed instruction corresponding to the fourth target count value from the storage unit 101 according to the fifteenth address in the unconditional jump register and link instruction. Read the fifteenth address from memory cell 101 The second jump value stored in the instruction counter is read from the storage unit 101 according to the fifth target count value of the instruction counter indicated by the second jump value.

[0107] In an embodiment of the present application, the control unit 102 can read an unconditional jump instruction and an unconditional jump and link instruction from the storage unit 101, so that the control unit 102 can jump to the instruction to be executed indicated by the instruction according to the unconditional jump instruction, thereby realizing an unconditional jump. Since there is no need to report to the central control in the main node when processing the unconditional jump instruction, there is no need to report to the central control of the node through the link. Therefore, the processing speed of the unconditional jump instruction is faster, the processing efficiency of the instruction to be executed is improved, and the delay in data transmission and processing is reduced.

[0108] It should be understood that the values ​​of parameters such as op and funct3 in the above embodiments are only for illustrative purposes, and the embodiments of the present application do not limit the specific values ​​of parameters such as op and funct3.

[0109] Fig.14 is a schematic diagram of a chip including a reading subunit and an analyzing subunit provided in an embodiment of the present application, such as Fig.14As shown, the control unit 102 includes a reading subunit 1021 and a parsing subunit 1022. The reading subunit 1021 is used to read the instructions to be executed from the storage unit 101 and send the instructions to be executed to the parsing subunit 1022. The parsing subunit 1022 is used to parse the instructions to be executed, obtain the instruction type of the instructions to be executed, and send the instruction type of the instructions to be executed to the execution unit 103.

[0110] In one example, the reading subunit 1021 can read the instructions to be executed from the storage unit 101 according to the count value of the instruction counter. It should be noted that the reading subunit 1021 and the parsing subunit 1022 can cooperate with each other to implement the operation of the control unit 102 in any of the above embodiments.

[0111] The present application also provides a computer software, which can compile the parsing subunit 1022 logically by writing assembly code to realize the functions that the parsing subunit 1022 needs to execute. The assembly code needs to go through a layer of translation, and this work is implemented by a simple assembler. The specific functions of the assembler are: 1. Support embedded macro (macros), 2. Support assembly LABEL (function name), 3. Support function stack, 4. Support comments, 5. Support assembly code to binary file.

[0112] In an embodiment of the present application, the control unit 102 includes a reading subunit 1021 and a parsing subunit 1022, so that the instructions to be executed stored in the storage unit 101 can be read by the reading subunit 1021, and the instructions to be executed can be parsed by the parsing subunit 1022, thereby enabling the execution subunit to execute the instructions to be executed.

[0113] It should be noted that the chip 100 in any of the above embodiments can achieve the following advantages by the structure shown in any of the above embodiments: 1. Simple structure and small logic resource occupation; 2. Strong scalability, with a large margin in the instruction set encoding space. It is only necessary to define the instructions and implement the corresponding logic circuit; 3. Compared with the current state machine circuit of the functional node, it has greater flexibility (the parsing subunit 1022 can be compiled by software).

[0114] An embodiment of the present application also provides a networking system, including: multiple connected nodes, the multiple nodes including a main node and at least one child node, a target node among the multiple nodes including the chip 100 in any of the above embodiments, and the target node is any one of the multiple nodes.

[0115] In one example, if Figure 1 and Figure 2 As shown, the multiple nodes may include a master node and a sub-node, and the target node may be a master node or a slave node, which will not be described in detail here.

[0116] An embodiment of the present application further provides an electronic device, which includes the chip 100 in any of the above embodiments.

[0117] It should be understood that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method embodiment, since it is basically similar to the method described in the device and system embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of other embodiments.

[0118] It should be understood that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] It should be understood that an element described in singular form herein or shown in the drawings as only one does not limit the number of the element to one. In addition, modules or elements described or shown as separate herein may be combined into a single module or element, and modules or elements described or shown as single herein may be split into multiple modules or elements.

[0120] It should also be understood that the terms and expressions used herein are for description only, and one or more embodiments of this specification should not be limited to these terms and expressions. The use of these terms and expressions does not mean to exclude any equivalent features of the illustrations and descriptions (or parts thereof), and it should be recognized that various modifications that may exist should also be included in the scope of the claims. Other modifications, changes and substitutions may also exist. Accordingly, the claims should be deemed to cover all such equivalents.

Claims

1. A chip, applied to a target node included in a networking system, characterized in that: The networking system includes a plurality of connected nodes, the plurality of nodes include a master node and at least one sub-node, the target node is any one of the at least one sub-node, the master node and the at least one sub-node are connected via a physical transmission medium, the chip is arranged at the target node, the sub-node executes the instruction issued by the master node without reporting to the master node, and the chip includes: a storage unit, a control unit and an execution unit; The storage unit is used to store the instructions to be executed issued by the master node; The control unit is configured to read the instruction to be executed from the storage unit, parse the instruction to be executed, obtain the instruction type of the instruction to be executed, and send the instruction type of the instruction to be executed to the execution unit; The execution unit is used to execute the instruction to be executed according to the instruction type of the instruction to be executed.

2. The chip according to claim 1, characterized in that: The control unit is used to read the to-be-executed instruction from the storage unit according to the count value of the instruction counter, the instruction counter increases the count value periodically, and the count value increment of the instruction counter in each period is positively correlated with the length of the to-be-executed instruction.

3. The chip according to claim 2, characterized in that: The chip further comprises: a temporary storage unit; The temporary storage unit is used to store the source operand and the destination operand in the process of the execution unit executing the instruction to be executed.

4. The chip according to claim 3, characterized in that: The temporary storage unit includes a plurality of registers, or the storage unit includes the temporary storage unit.

5. The chip according to claim 3, characterized in that: The execution unit includes: an operation subunit and a read-write subunit; The operator unit is used to perform a logical operation according to the instruction type of the instruction to be executed; The read / write subunit is used to read and write the temporary storage unit and / or the peripheral device connected to the target node according to the logic operation result after receiving the logic operation result of the operation subunit.

6. The chip according to claim 5, characterized in that: The control unit is used to determine the instruction type of the instruction to be executed according to the value of the instruction type field in the instruction to be executed, and the instruction type includes at least one of an interrupt instruction, a memory access instruction, a conditional jump instruction and a calculation instruction.

7. The chip according to claim 6, characterized in that: The interruption instruction includes an interruption status read instruction and an interruption status write instruction; The control unit is used to send the first address in the instruction to be executed to the operator unit when the instruction to be executed is the interrupt status read instruction, so that the operator unit writes the status bit to the first address in the temporary storage unit, and when the instruction to be executed is the interrupt status write instruction, send the second address in the instruction to be executed to the temporary storage unit, and the temporary storage unit sends the source operand stored in the second address to the operator unit, so that the operator unit updates the status bit to the source operand stored in the second address in the temporary storage unit.

8. The chip according to claim 6, characterized in that: The memory access instructions include memory access read instructions and memory access write instructions; When the instruction to be executed is the memory access read instruction, the control unit sends the third address, the first base address and the first offset in the instruction to be executed to the operation subunit, and sends a read request to the read-write subunit, the operation subunit determines the first peripheral address according to the first base address and the first offset, and sends the first peripheral address and the third address to the read-write subunit, the read-write subunit reads the first data from the corresponding peripheral according to the read request and the first peripheral address, and writes the first data to the third address in the temporary storage unit; When the instruction to be executed is the memory access and write instruction, the control unit sends the fourth address in the instruction to be executed to the temporary storage unit, and sends the second base address and the second offset in the instruction to be executed to the operator unit, and sends a write request to the read-write subunit, the temporary storage unit sends the second data stored in the fourth address to the operator unit, the operator unit determines the second peripheral address according to the second base address and the second offset, and sends the second data and the second peripheral address to the read-write subunit, and the read-write subunit writes the second data into the peripheral corresponding to the second peripheral address according to the write request.

9. The chip according to claim 6, characterized in that: When the instruction to be executed is the conditional jump instruction, the control unit sends the fifth address in the conditional jump instruction to the temporary storage unit, and sends the immediate number in the conditional jump instruction to the operator unit, the temporary storage unit sends the third data stored in the fifth address to the operator unit, the operator unit determines whether the third data meets the condition, and if the condition is met, determines the first target count value of the instruction counter according to the immediate number, and sends the first target count value to the control unit, and the control unit reads the instruction to be executed corresponding to the first target count value from the temporary storage unit according to the first target count value.

10. The chip according to claim 6, characterized in that: The calculation instructions include shift instructions and numerical calculation instructions; When the instruction to be executed is the shift instruction, the control unit sends the sixth address in the instruction to be executed to the temporary storage unit, and sends the immediate number in the instruction to be executed to the operator unit, the temporary storage unit sends the fourth data stored in the sixth address to the operator unit, the operator unit performs an arithmetic shift or a logical shift on the fourth data through the immediate number to obtain fifth data, and sends the fifth data and the sixth address to the read-write subunit, the read-write subunit writes the fifth data into the sixth address of the temporary storage unit, or the control unit sends the seventh address and the eighth address in the instruction to be executed to the temporary storage unit, the temporary storage unit sends the sixth data stored in the seventh address and the shift value stored in the eighth address to the operator unit, the operator unit performs an arithmetic shift or a logical shift on the sixth data through the shift value to obtain seventh data, and sends the seventh data and the seventh address to the read-write subunit, the read-write subunit writes the seventh data into the seventh address of the temporary storage unit; When the instruction to be executed is a numerical calculation instruction, the control unit sends the ninth address in the instruction to be executed to the temporary storage unit, and sends the immediate number in the instruction to be executed to the operator unit, the temporary storage unit sends the eighth data stored in the ninth address to the operator unit, the operator unit performs arithmetic operation on the eighth data and the immediate number to obtain ninth data, and sends the ninth data and the ninth address to the read-write subunit, the read-write subunit writes the ninth data to the ninth address of the temporary storage unit, or the control unit sends the tenth address and the eleventh address in the instruction to be executed to the temporary storage unit, the temporary storage unit stores the tenth data stored in the tenth address and the eleventh address in the temporary storage unit. The eleventh data stored in the instruction to be executed is sent to the operator unit, the operator unit performs a logical operation on the tenth data and the eleventh data to obtain the twelfth data, and sends the twelfth data and the tenth address to the read-write subunit, and the read-write subunit writes the twelfth data into the tenth address of the temporary storage unit, or the control unit sends the thirteenth address in the instruction to be executed to the temporary storage unit, and sends the twelfth address in the instruction to be executed to the operator unit, the temporary storage unit sends the thirteenth data stored in the thirteenth address to the operator unit, the operator unit sends the thirteenth data and the twelfth address to the read-write subunit, and the read-write subunit writes the thirteenth data to the twelfth address of the temporary storage unit.

11. The chip according to claim 3, characterized in that: The control unit is used to read the unconditional jump instruction and the unconditional jump and link instruction from the storage unit; When the unconditional jump instruction is read, the control unit reads from the storage unit, according to the immediate number in the unconditional jump instruction, the instruction to be executed corresponding to the second target count value of the instruction counter indicated by the immediate number, or, according to the first jump value stored in the fourteenth address in the unconditional jump instruction, the control unit reads from the storage unit, according to the first jump value stored in the fourteenth address in the unconditional jump instruction, the instruction to be executed corresponding to the third target count value of the instruction counter indicated by the first jump value; When the unconditional jump and link instruction is read, the control unit sends the count value of the instruction counter corresponding to the unconditional jump and link instruction to the read-write subunit, and the read-write subunit writes the count value of the instruction counter into the temporary storage unit. The control unit reads the to-be-executed instruction corresponding to the fourth target count value of the instruction counter indicated by the immediate number from the storage unit according to the immediate number in the unconditional jump and link instruction, or the control unit reads the to-be-executed instruction corresponding to the fifth target count value of the instruction counter indicated by the second jump value from the storage unit according to the second jump value stored in the fifteenth address in the unconditional jump instruction.

12. The chip according to any one of claims 1 to 11, characterized in that: The control unit comprises: a reading subunit and a parsing subunit; The reading subunit is used to read the to-be-executed instruction from the storage unit and send the to-be-executed instruction to the parsing subunit; The parsing subunit is used to parse the instruction to be executed, obtain the instruction type of the instruction to be executed, and send the instruction type of the instruction to be executed to the execution unit.

13. A networking system, characterized in that: include: A plurality of nodes are connected, the plurality of nodes include a main node and at least one child node, the main node and the at least one child node are connected via a physical transmission medium, a target node among the plurality of nodes includes a chip as described in any one of claims 1-12, the target node is any one of the at least one child node, the chip is arranged at the target node, and the child node executes instructions issued by the main node without reporting to the main node.

14. An electronic device, characterized in that: include: A chip as claimed in any one of claims 1 to 12.