Processor, processor control method and computer readable medium
By independently configuring each cluster in the processor to lock-step mode or independent mode, the lock-step mode adjustment with the smallest granularity is realized, solving the problem of inflexible core state adjustment in the existing technology, and satisfying the needs of various application scenarios. Balancing functional safety and performance needs.
Patent Information
- Application Number
- CN202310341876.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-15
AI Technical Summary
When existing processors achieve a balance between functional safety and performance requirements, the granularity of adjusting core states is relatively large and cannot flexibly meet the needs of multiple application scenarios, resulting in performance degradation or functional safety issues.
Provide a processor in which each cluster can be independently configured in lockstep mode or independent mode, allowing each two cores to form a lockstep group or independent state, achieving the smallest granularity of lockstep mode adjustment, and flexibly adjusting the lockstep state as needed number of cores to balance functional safety and performance.
It achieves a flexible balance between processor functional safety and performance, meets the needs of more application scenarios, improves resource utilization, and avoids performance degradation caused by core failures.
Smart Images

Figure CN118779277A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of chip architecture technology, and in particular to a processor, a processor control method, and a computer-readable medium. Background Art
[0002] A processor (such as a multi-core chip) includes multiple cores (Core), each core can run relatively independently, and multiple cores can also be formed into a cluster (Cluster), each cluster includes four cores.
[0003] The core may fail. To prevent the failed core from affecting the functional safety of the processor, the "Dual Core Lock Step (DCLS)" technology can be used, that is, two of the four cores in the cluster form a lock step group (a total of two lock step groups). The two cores in the lock step group process the same operation synchronously, and errors can be discovered in time by comparing the operation results of the two cores. It can be seen that the two cores in the lock step group can actually only do the work of one core, so the lock step has a large resource overhead and low resource utilization, which will lead to a decrease in processor performance.
[0004] However, related technologies cannot flexibly achieve a balance between the functional safety requirements and performance requirements of the processor. Summary of the invention
[0005] The present disclosure provides a processor, a processor control method, and a computer-readable medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a processor, which includes a plurality of clusters, each of the clusters including two cores;
[0007] The cluster can be independently configured as lock-step mode or independent mode; the two cores of the cluster in lock-step mode are in lock-step state, and every two cores in lock-step state constitute a lock-step group, and the two cores in the same lock-step group synchronously process the same operation; the two cores of the cluster in independent mode are in independent state.
[0008] In a second aspect, an embodiment of the present disclosure provides a method for controlling a processor, wherein the processor includes a plurality of clusters, each of the clusters includes two cores; the clusters can be independently configured as a lock-step mode or an independent mode; the two cores of the cluster in the lock-step mode are in a lock-step state, and each two cores in the lock-step state constitute a lock-step group, and the two cores in the same lock-step group synchronously process the same operation; the two cores of the cluster in the independent mode are in an independent state; the method includes:
[0009] The core is used to process target operations; the target operations include safety operations and general operations, and all the safety operations are processed by the core in a lock-step state.
[0010] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon. When the computer program is executed by any processor of the embodiments of the present disclosure, any processor control method of the embodiments of the present disclosure can be implemented.
[0011] In the embodiment of the present disclosure, each cluster can be independently configured as lock-step mode or independent mode, that is, the states of the cores in different clusters (lock-step state or independent state) are relatively independent, and each cluster in the embodiment of the present disclosure has only two cores, so it is equivalent to being able to choose whether to lock-step with "two cores" as the minimum unit; therefore, the embodiment of the present disclosure achieves the "minimum granularity" lock-step mode adjustment in the processor with clusters, that is, the functional safety and performance of the processor can be balanced with the "maximum flexibility" as needed, which can meet the needs of more situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In the accompanying drawings of the embodiments of the present disclosure:
[0013] Figure 1 A schematic diagram of the architecture of a processor provided in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of a cluster mode in a state in another processor provided by an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of a cluster mode in a state in another processor provided in an embodiment of the present disclosure;
[0016] Figure 4 A flowchart of a processor control method provided by an embodiment of the present disclosure;
[0017] Figure 5 A flowchart of a processor control method provided in an embodiment of the present disclosure
[0018] Figure 6 A block diagram of a computer-readable medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the processor, the processor control method, and the computer-readable medium provided in the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0020] The present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as being limited to the embodiments set forth below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and will enable those skilled in the art to fully understand the scope of the present disclosure.
[0021] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification, and are used together with the detailed embodiments to explain the present disclosure, and do not constitute a limitation of the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.
[0022] The present disclosure may be described with reference to plan views and / or cross-sectional views by means of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0023] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0024] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. The term "and / or" as used in the present disclosure includes any and all combinations of one or more related enumerated items. The singular forms "one" and "the" as used in the present disclosure are also intended to include plural forms, unless the context clearly indicates otherwise. The terms "including", "made of..." as used in the present disclosure specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0025] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.
[0026] First, refer to Figures 1 to 3 , an embodiment of the present disclosure provides a processor.
[0027] The processor (chip) of the embodiment of the present disclosure is an independent computing device, for example, it can be in the form of a chip (IC).
[0028] The processor of the embodiment of the present disclosure includes multiple clusters, and each cluster includes two cores.
[0029] Among them, the cluster can be independently configured as lock-step mode or independent mode; the two cores of the cluster in lock-step mode are in lock-step state, and every two cores in lock-step state constitute a lock-step group. The two cores in the same lock-step group synchronously process the same operation; the two cores of the cluster in independent mode are in independent state.
[0030] Reference Figure 1 The processor of the embodiment of the present disclosure includes multiple cores, for example, in the form of a multi-core chip. Each core has a certain data processing capability and can work relatively independently, and the cores are interconnected (such as through a bus), so that multiple cores can collaboratively process certain tasks.
[0031] Reference Figure 1 Every two cores form a cluster. The connection between cores in a cluster is closer than that between cores in different cores. For example, two cores in a cluster can share the L2 cache or be directly connected through the interconnect protocol instead of a bus.
[0032] In the disclosed embodiment, each cluster of processors can be independently configured as a lockstep mode or an independent mode, that is, there is no necessary relationship between the mode selections of different clusters.
[0033] When a cluster is in lockstep mode, each core is in lockstep state; wherein, all cores in lockstep state (not necessarily all cores in a cluster) must be in a "lockstep group", each lockstep group has two cores, and the two cores work in "dual core lockstep (DCLS)" mode, synchronously processing the same operation, that is, two cores (which may be of the same structure) read and execute the same instructions or data at the same time, so that theoretically the same operation results should be generated at the same time. That is to say, in the embodiment of the present disclosure, all cores in lockstep state must be "combined in pairs" and work in dual-core lockstep mode (since the lockstep mode is selected in clusters in the embodiment of the present disclosure, and each cluster includes two cores, the cores in lockstep state must be an even number).
[0034] When a cluster is in standalone mode, each core in it is in an independent state; the cores in the independent state work relatively independently.
[0035] It can be seen that the processor of the embodiment of the present disclosure adopts a cluster architecture, each cluster has and only has two cores, and the architecture of the processor can also ensure that the cores in each cluster can be selected as a lock-step state or an independent state, and the selection of core states in different clusters is relatively independent.
[0036] It should be understood that since the mode selection of each cluster in the embodiment of the present disclosure is independent of each other, there may be a situation where all clusters are in lock-step mode (all cores are in lock-step state), or there may be a situation where all clusters are in independent mode (all cores are in independent state).
[0037] It can be seen that due to the influence of aging, static electricity, short circuit, external impact, electromagnetic interference, etc., it is inevitable that the core will fail (such as failure), and the operation processed by the faulty core will also be wrong, which will lead to problems with the functional safety of the processor. In order to avoid the core failure causing operation errors and affecting the functional safety of the processor, the lock-step method can be used. That is, the two cores in the lock-step group process the same operation, so that the corresponding operation is processed "twice", and whether there is an operation error can be determined by comparing whether the operation results of the two cores are the same. However, the two cores in the lock-step group actually only perform the work of one core, and one of the cores is equivalent to "hardware redundancy", which leads to increased resource overhead, reduced resource utilization, and reduced processor performance. For example, when all cores of the processor are in lock-step state, the actual performance of the processor is equivalent to being reduced to half of its theoretical maximum performance (that is, when all cores are in independent state).
[0038] Therefore, the functional safety requirements and performance requirements of the processor are contradictory, and some method is needed to achieve a balance between the two.
[0039] In the fields of automobile control and industrial production, some operations may seriously threaten personal and property safety if errors occur. For example, errors in the operation that generates automobile control instructions in autonomous driving may lead to incorrect control of the car and cause serious consequences. Therefore, the above operations have high reliability requirements and are called "safety operations". In contrast, although other operations also have adverse effects when errors occur, the impact is relatively small, and these operations are called "general operations".
[0040] To this end, it is expected that all safety operations are processed in the cores in the lock-step state, and general operations are processed in the cores in the independent state as much as possible, so as to maximize the performance of the processor while ensuring the basic functional safety. However, the ratio of safety operations to general operations is different in different application scenarios, so it is necessary to adjust the number of cores in the lock-step state and the number of cores in the lock-step state in the processor according to the specific application scenario to achieve a balance between functional safety requirements and performance requirements.
[0041] However, in some related technologies, when the processor adopts a cluster architecture, it can only adjust the state of the core at a large granularity (such as four cores), which leads to a large "minimum change" in the processor's functional safety and performance adjustment, inflexible adjustment, and inability to meet the needs of many situations. For example, in one case, the number of cores in the processor in lockstep state may be insufficient, resulting in some safety operations being able to run only in independent cores, causing functional safety issues. However, at this time, as long as the minimum number of cores in lockstep state (such as four) is increased, there will be too many cores in lockstep state, resulting in unnecessary decrease in processor performance. As a result, the related technology cannot flexibly achieve a balance between the functional safety requirements and performance requirements of the processor.
[0042] In the embodiment of the present disclosure, each cluster can be independently configured as lock-step mode or independent mode, that is, the states of the cores in different clusters (lock-step state or independent state) are relatively independent, and each cluster in the embodiment of the present disclosure has only two cores, so it is equivalent to being able to choose whether to lock-step with "two cores" as the minimum unit; therefore, the embodiment of the present disclosure achieves the "minimum granularity" lock-step mode adjustment in the processor with clusters, that is, the functional safety and performance of the processor can be balanced with the "maximum flexibility" as needed, which can meet the needs of more situations.
[0043] In some embodiments, all cores are structured identically.
[0044] As one method of an embodiment of the present disclosure, the structures of all cores in the processor may be the same (ie, all cores are "completely consistent"), so any two cores forming a lockstep group may directly run in a synchronous manner, making it easiest to select lockstep.
[0045] It should be understood that it is also feasible for two cores with different structures to form a lock-step group, as long as some methods (such as setting a synchronization point) can be used to ensure that the two cores run synchronously.
[0046] In some embodiments, two cores of a cluster in lockstep mode form a lockstep group.
[0047] Reference Figure 2 As one method of the embodiment of the present disclosure, when a cluster is in lockstep mode, its two cores can form a lockstep group, that is, the "lockstep within the cluster" method is adopted. Since the cores within the same cluster are more closely connected, locking the two cores within the cluster is beneficial to further improve the computing efficiency.
[0048] In some other embodiments, two cores of a cluster in lock-step mode and two cores of another cluster in lock-step mode respectively form two lock-step groups.
[0049] Reference Figure 3As another embodiment of the present disclosure, every two clusters in lockstep mode may form a group (so the number of clusters in lockstep mode in the processor must be an even number), and in the two clusters in the same group, each core in each cluster forms a lockstep group with a core in the other cluster, that is, the four cores in the two clusters form two lockstep groups in an "inter-cluster lockstep" manner. According to the above method, the two cores in each lockstep group come from different clusters, so the probability of the same operation error occurring between the two is lower, which can better ensure functional safety.
[0050] The "group" of clusters may be fixed, that is, it is preset that two clusters must form a group; or, the "group" of clusters may be optional, that is, when it is determined that an even number of clusters are to be in lock-step mode, they are temporarily determined to form a group of two.
[0051] It should be understood that the applicable ways of the embodiments of the present disclosure are not limited to the above specific examples.
[0052] For example, the total number of clusters in a processor, and the number of clusters in each mode, are not limited to Figure 2 , Figure 3 Example.
[0053] For another example, some clusters in the processor may adopt an “intra-cluster lock-step” approach, while other clusters may adopt an “inter-cluster lock-step” approach.
[0054] For another example, two cores in one lock-step mode cluster may form a lock-step group with one core in each of two other lock-step mode clusters, that is, the inter-cluster lock-step does not necessarily mean that two clusters form a group.
[0055] In some embodiments, each cluster is preset to lockstep mode or independent mode.
[0056] As one method of an embodiment of the present disclosure, in a processor product, each cluster may be "pre-set" to a certain mode (lock-step mode or independent mode). For example, when the processor leaves the factory, the number of independent and lock-step cores can be determined based on the subsequent application scenarios of the processor, and the mode of each cluster can be set accordingly.
[0057] It should be understood that, according to the above method, although the mode of the cluster in the processor product has been "pre-set", the mode of each cluster is still "configurable", that is, the mode of the cluster is "set" through software rather than being determined as a certain mode from a physical structure.
[0058] It should be understood that in processor products, it is also feasible if the mode of each cluster is adjusted in "real time" according to the current computing situation.
[0059] In some embodiments, the processor of the embodiment of the present disclosure further includes: a comparison module configured to compare the operation results of two cores in the same lockstep group.
[0060] Reference Figure 2 , Figure 3 As a method of an embodiment of the present disclosure, the processor of the embodiment of the present disclosure may also include a "comparison module". The comparison module can receive the operation results of the two cores in the lock-step group and compare the two operation results. If the two are consistent, it indicates that the operation is normal. If the two are inconsistent, it can be determined that there is an error in the operation of at least one of the cores, so that an alarm can be issued.
[0061] For example, refer to Figure 2 , Figure 3 The comparison module can be a separate module connected to the bus, so that the core operation results can be received through the bus. Alternatively, some cores can be used as comparison modules, such as two cores in a lockstep group that compare their own operation results with each other's operation results.
[0062] It should be understood that reference Figure 2 , Figure 3 The processor may also include modules that play other roles ( Figure 2 , Figure 3 In the example above, module A, module B, and module C are taken as examples. These modules can also be connected to the bus.
[0063] Among them, the specific forms of other modules can be determined according to the processor form. For example, when the processor is an automotive network chip, other modules may include accelerators, DMA (direct memory access unit), safety islands, etc.; for example, when the processor is a general-purpose chip, other modules may include GPU (graphics processor), ISP (image signal processor), DSP (digital signal processor), NPU (neural network processor), etc.
[0064] Second, refer to Figures 1 to 5 An embodiment of the present disclosure provides a method for controlling a processor, wherein the processor includes multiple clusters, each cluster includes two cores; the clusters can be independently configured as a lock-step mode or an independent mode; the two cores of the cluster in the lock-step mode are in a lock-step state, and every two cores in the lock-step state constitute a lock-step group, and the two cores in the same lock-step group synchronously process the same operation; the two cores of the cluster in the independent mode are in an independent state.
[0065] The embodiments of the present disclosure are used to control the above processors so as to use them to perform required operations.
[0066] Reference Figure 4 , the processor control method of the embodiment of the present disclosure includes:
[0067] S201, use the core to process the target operation.
[0068] Among them, the target operation includes safety operation and general operation, and all safety operations are processed by the core in the lock-step state.
[0069] As before, all operations that need to be processed by the core of the processor (target operations) are divided into two forms: safety operations and general operations. According to the embodiments of the present disclosure, at least all safety operations must be processed by the core in the lock-step state to ensure the performance safety of the processor.
[0070] It should be understood that the specific scope of security operations and general operations, as well as which core processes each operation, can be pre-set.
[0071] In some embodiments, before using the core to process the target operation (S201), the method further includes:
[0072] S200 , according to the amount of safety calculation and the amount of general calculation, preset each cluster to a lock-step mode or an independent mode.
[0073] As one method of an embodiment of the present disclosure, before the processor product leaves the factory, each cluster may be pre-set to lock-step mode or independent mode based on the amount of security operations and general operations (or the ratio of security operations to general operations) in its specific application scenario.
[0074] It should be understood that, as before, it is also feasible to adjust the cluster mode in "real time" according to the situation at each moment during the use of the processor.
[0075] In some embodiments, reference Figure 5 According to the amount of safety calculation and the amount of general calculation, each cluster is preset to a lock-step mode or an independent mode (S200), including:
[0076] S2001. Determine the minimum number of cores in a lock-step state required to process the safety operation according to the amount of safety operation and the amount of general operation.
[0077] S2002: Determine that the cluster including the minimum number of cores is in lock-step mode, and determine that the other clusters are in independent mode.
[0078] As one method of an embodiment of the present disclosure, it is possible to determine "at least" how many cores in lock-step state are needed to process the safety operation based on the amount of calculation of the safety operation, that is, determine the minimum number of cores in lock-step state (since cores in lock-step state must constitute a lock-step group, the total number of cores in lock-step state must be an even number), and based on the minimum number, determine that the number of clusters in lock-step mode is equal to "minimum number / 2", and set the corresponding number of clusters to lock-step mode, while all other clusters are set to independent mode.
[0079] It should be understood that the number of lock-step mode clusters selected above may be zero, that is, all clusters may be clusters in independent mode; or, the number of lock-step mode clusters selected above may be equal to the total number of clusters in the processor, that is, all clusters may be clusters in lock-step mode.
[0080] As before, the more cores in lock-step state, the lower the performance of the processor; and according to the above method, the number of cores in independent state can be increased to the maximum extent while ensuring that all safety operations are processed by cores in lock-step state, that is, the performance of the processor can be maximized while ensuring the safety of processor performance.
[0081] It should be understood that "all safety operations are processed by cores in lockstep state, and all general operations are processed by cores in independent state" is expected by the embodiments of the present disclosure, because this can maximize the performance of the processor while ensuring the safety of processor performance, but this situation may not be achievable in all cases.
[0082] For example, refer to Figure 1 According to the needs of the application scenario, a specific processor of the embodiment of the present disclosure is designed to have 8 cores, which are divided into 4 clusters, each cluster has 2 cores, then according to the actual application scenario, any n (n is selected from 0, 1, 2, 3, 4) of the clusters can be set to lockstep mode, and the other clusters can be set to independent mode, thus:
[0083] (1) When n=0, 0 clusters are in lockstep mode and 4 clusters are in independent mode, that is, 8 cores are in independent state, which is equivalent to 8 cores in the processor actually used for processing operations, and the overall performance of the processor is 100% of its theoretical maximum performance (i.e., the performance when all cores are in independent state).
[0084] (2) When n=1, one cluster is in lock-step mode and three clusters are in independent mode, that is, six cores are in independent state and two cores are in lock-step state (which is equivalent to one core actually being used to process operations), which is equivalent to seven cores in the processor actually being used to process operations, and the overall performance of the processor is 87.5% of its theoretical maximum performance.
[0085] (3) When n=2, 2 clusters are in lock-step mode and 2 clusters are in independent mode, that is, 4 cores are in independent state and 4 cores are in lock-step state (which is equivalent to 2 cores actually being used to process operations), which is equivalent to 6 cores in the processor actually being used to process operations, and the overall performance of the processor is 75% of its theoretical maximum performance.
[0086] (4) When n=3, 3 clusters are in lock-step mode and 1 cluster is in independent mode, that is, 2 cores are in independent state and 6 cores are in lock-step state (which is equivalent to 3 cores actually used for processing operations), which is equivalent to 5 cores in the processor actually used for processing operations, and the overall performance of the processor is 62.5% of its theoretical maximum performance.
[0087] (5) When n=4, 4 clusters are in lock-step mode and 0 cluster is in independent mode, that is, 8 cores are in lock-step state (which is equivalent to 4 cores actually being used to process operations), which is equivalent to 4 cores in the processor actually being used to process operations, and the overall performance of the processor is 50% of its theoretical maximum performance.
[0088] It can be seen that in the embodiment of the present disclosure, when n clusters are selected as lock-step mode, the overall performance of the processor is (1-n / 8)% of its theoretical maximum performance, that is, the overall performance of the processor can vary between 50% and 100% of its theoretical maximum performance, and there are "five variation gears", which can be pre-set according to specific application scenarios, or adjusted in real time during the use of the processor.
[0089] In contrast, in some related technologies, if the processor also has 8 cores but is divided into 2 clusters, each with 4 cores, any n (n is selected from 0, 1, 2) of the clusters can be set to lock-step mode according to the actual application scenario, and the other clusters can be set to independent mode, thus:
[0090] (1) When n=0, 0 clusters are in lockstep mode and 2 clusters are in independent mode, that is, all 8 cores are in independent state, which is equivalent to 8 cores in the processor actually used for processing operations, and the overall performance of the processor is 100% of its theoretical maximum performance (that is, the performance when all cores are in independent state).
[0091] (2) When n=1, one cluster is in lock-step mode and one cluster is in independent mode, that is, 4 cores are in independent state and 4 cores are in lock-step state (which is equivalent to 2 cores actually used for processing operations), which is equivalent to 6 cores in the processor actually used for processing operations, and the overall performance of the processor is 75% of its theoretical maximum performance.
[0092] (5) When n=2, 2 clusters are in lock-step mode and 0 cluster is in independent mode, that is, 8 cores are in lock-step state (which is equivalent to 4 cores actually being used to process operations), which is equivalent to 4 cores in the processor actually being used to process operations, and the overall performance of the processor is 50% of its theoretical maximum performance.
[0093] It can be seen that when n clusters are selected as lock-step mode in the related technology, the overall performance of the processor is (1-n / 4)% of its theoretical maximum performance, so the overall performance of the processor also varies between 50% and 100% of its theoretical maximum performance, but there are only "three variation gears".
[0094] That is to say, for clustered processors of the same size (i.e., the size of each core and the total number of cores are the same), the embodiments of the present disclosure can select their performance in more "gears", thereby "more flexibly" achieving a balance between the functional safety requirements and performance requirements of the processor.
[0095] Thirdly, refer to Figure 6 The embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored. When the computer program is executed by any processor of the embodiment of the present disclosure, any processor control method of the embodiment of the present disclosure can be implemented.
[0096] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0097] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.
[0098] Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-temporary medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical disk storage; magnetic cassettes, magnetic tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0099] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A processor, wherein: comprising a plurality of clusters, each of the clusters comprising two cores; The cluster can be independently configured as lock-step mode or independent mode; the two cores of the cluster in lock-step mode are in lock-step state, and every two cores in lock-step state constitute a lock-step group, and the two cores in the same lock-step group synchronously process the same operation; the two cores of the cluster in independent mode are in independent state.
2. The processor according to claim 1, wherein: The two cores of the cluster in lock-step mode constitute one lock-step group.
3. The processor according to claim 1, wherein: The two cores of the cluster in lock-step mode respectively form two lock-step groups with the two cores of the cluster in another lock-step mode.
4. The processor according to claim 1, wherein: Each of the clusters is preset to either lock-step mode or independent mode.
5. The processor according to claim 1, wherein: Also includes: The comparison module is configured to compare the operation results of the two cores in the same lockstep group.
6. The processor of claim 1, wherein: All of the cores have the same structure.
7. A processor controlled method, wherein: The processor includes a plurality of clusters, each of which includes two cores; the clusters can be independently configured in lock-step mode or independent mode; the two cores of the cluster in lock-step mode are in lock-step state, and each two cores in lock-step state constitute a lock-step group, and the two cores in the same lock-step group synchronously process the same operation; The two cores of the cluster in independent mode are in independent state; the method comprises: Processing a target operation using the core; The target operations include safety operations and general operations, and all the safety operations are processed by the core in a lock-step state.
8. The method according to claim 7, wherein: Before using the core to process the target operation, the method further includes: Each of the clusters is preset to a lock-step mode or an independent mode according to the computational load of the safety computation and the computational load of the general computation.
9. The method according to claim 7, wherein: The step of presetting each cluster to a lock-step mode or an independent mode according to the computational load of the safety computation and the computational load of the general computation includes: Determining a minimum number of cores in a lock-step state required to process the safety operation according to the amount of computation of the safety operation and the amount of computation of the general operation; A cluster including the minimum number of cores is determined to be in lockstep mode, and other clusters are determined to be in independent mode.
10. A computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by the processor according to any one of claims 1 to 6, the processor-controlled method according to any one of claims 7 to 9 can be implemented.
