Verification method, system, device and storage medium for processor
Patent Information
- Application Number
- CN202211144769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-09-20
AI Technical Summary
[0003]这种实现方式会带来另外的问题,即每个单元执行码执行时需要使用的资源可能不同,而执行单元为了提高效率,一般会支持乱序执行,也就是说,虽然在解码单元调度给执行单元时,单元执行码的排序是顺序的,但其实每个单元执行码实际占用资源和释放资源的时间并不一定,而物理资源本身是有限的,从而容易发生影响单元执行码的调度的问题
[0008] Compared with the prior art, the beneficial effects of at least one embodiment of this disclosure include: realizing resource monitoring in the full simulation process by performing a complete abstract modeling of the resource pool (e.g., an asynchronous resource pool), and checking the voucher queue through the established model to verify the resource pool, which greatly improves the verification convergence speed, and achieves low coupling, good project portability, and saves manpower.
Smart Images

Figure CN115480989B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to a method, system, apparatus, and storage medium for verifying a processor. Background Technology
[0002] To improve performance, processors (such as CPUs) sometimes combine frequently used complex calculations into a single instruction; that is, a single instruction may contain multiple executable codes. For ease of development and maintenance, processors are generally divided into two parts: a decoding unit and an execution unit. This way, when adding similar complex calculation instructions, only the decoding unit needs to be modified, without altering the execution unit. The decoding unit simply schedules the decoded executable codes to the execution unit in sequence, and the execution unit then uses the relevant physical resources to complete the execution.
[0003] This implementation method brings another problem: the resources required for the execution of each unit's execution code may be different. In order to improve efficiency, the execution unit generally supports out-of-order execution. That is to say, although the unit's execution code is ordered when the decoding unit schedules it to the execution unit, the actual time each unit's execution code occupies and releases resources is not necessarily the same. Since physical resources are limited, this can easily lead to problems that affect the scheduling of unit execution codes. Summary of the Invention
[0004] At least one embodiment of this disclosure provides a verification method for a processor, comprising: creating a resource pool model corresponding to a resource pool of the processor; monitoring the state information changes of a credential queue module to be tested in the resource pool during the process of the processor performing tasks on multiple objects; in response to monitoring the state information changes of the credential queue module, using the resource pool model to acquire and record monitoring state information based on the state information changes of the credential queue module; and verifying the resource pool based on the monitoring state information of the resource pool model.
[0005] At least one embodiment of this disclosure provides a verification system for a processor, comprising: a monitor configured to monitor changes in the state information of a credential queue module under test in the processor's resource pool during the processor's processing of multiple objects to perform tasks; and a resource pool model configured to create a resource pool corresponding to the processor and configured to, in response to monitoring changes in the state information of the credential queue module, acquire and record monitoring state information based on the changes in the state information of the credential queue module, and verify the resource pool based on the monitoring state information.
[0006] At least one embodiment of this disclosure provides an electronic device, including: a processing unit and a storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, it implements the verification method as described in any of the above embodiments.
[0007] At least one embodiment of this disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, which, when executed by a processing unit, implements the verification method as described in any of the above examples.
[0008] Compared with the prior art, the beneficial effects of at least one embodiment of this disclosure include: realizing resource monitoring in the full simulation process by performing a complete abstract modeling of the resource pool (e.g., an asynchronous resource pool), and checking the voucher queue through the established model to verify the resource pool, which greatly improves the verification convergence speed, and achieves low coupling, good project portability, and saves manpower. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic diagram of a verification system for a processor provided for some embodiments of this disclosure;
[0011] Figure 2 This is a schematic diagram illustrating monitoring status information consistent with the real-time status of the credential queue module, provided in some embodiments of this disclosure.
[0012] Figure 3 A schematic diagram of the module composition of the first credential loss checking module of the resource pool model provided in some embodiments of this disclosure;
[0013] Figure 4 This is a schematic diagram illustrating monitoring status information consistent with the real-time status of the credential queue module, provided in some other embodiments of this disclosure.
[0014] Figure 5 A flowchart illustrating a verification method for a processor provided for some embodiments of this disclosure;
[0015] Figure 6 for Figure 5 A flowchart of an execution process for step S3 of the verification method used for the processor;
[0016] Figure 7A flowchart illustrating an execution process of step S41 of the verification method for a processor provided in some embodiments of this disclosure;
[0017] Figure 8 A flowchart illustrating the execution process of step S412 of the verification method for a processor provided in some embodiments of this disclosure; and
[0018] Figure 9 This is a block diagram of an electronic device provided for some embodiments of this disclosure. Detailed Implementation
[0019] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0020] Unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of this disclosure shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and shall not be interpreted in an idealized or highly formalized sense, unless expressly defined in the embodiments of this disclosure.
[0021] The terms "first," "second," and similar words used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms "an," "one," or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Likewise, the terms "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The terms "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Flowcharts are used in this disclosure to illustrate the steps of the method according to embodiments of this disclosure. It should be understood that the preceding or following steps are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0022] The resource pool manages the total amount of all resources and can contain multiple credential queues. Currently, when a decoding unit is scheduled to an execution unit, although the scheduling of unit execution codes is sequential, the actual time each unit execution code occupies and releases resources is not necessarily the same. Since physical resources are limited, an asynchronous resource pool needs to be implemented to uniformly allocate and reclaim all physical resources.
[0023] The inventors of this disclosure have discovered that an asynchronous resource pool may include multiple resource credential queues and a buffer credential queue. Each resource credential queue represents the total amount of a type of resource credential, and each queue stores a usage credential for a physical resource, i.e., a resource credential. The buffer credential queue is primarily used to ensure that the order of the unit execution code matches the original instruction order, similar to token scheduling. For example, a physical register resource credential queue stores usage credentials for physical register resources, a logic unit resource credential queue stores usage credentials for logic computation unit resources, and other physical resources also have corresponding credential queues. For instance, if the allocation and release of resources in multiple resource credential queues of the resource pool do not necessarily occur at the same time, then the resource pool is considered an asynchronous resource pool, meaning that resource asynchrony occurs.
[0024] The inventors of this disclosure discovered that buffer credentials are returned in the order of application, while resource credentials are not necessarily returned because the execution of multiple unit execution codes may be out of order. For example, for a unit execution code corresponding to addition, it needs to perform a read operation to obtain the operand, and then perform the addition operation. Furthermore, another unit execution code scheduled after this addition unit execution code (which is relatively younger, and the previous addition unit execution code is older) also needs the physical resources corresponding to the addition operation. Since the read operation corresponding to the older unit execution code takes longer, the addition operation of the older unit execution code is later than that of the younger unit execution code, resulting in a relatively later release of the resources corresponding to the older unit execution code. Therefore, the order of resource credential release is uncertain.
[0025] For example, before a unit executable is scheduled, the decoding unit determines which physical resources it needs to execute. Based on this, the unit executable will request a resource credential from the corresponding resource credential queue. This indicates that the unit executable has the right to use a certain physical resource throughout its lifecycle and requests a slot from the buffer credential queue. When a resource credential queue is empty, it means that the physical resource is fully occupied. At this time, new unit executables that need to use this physical resource cannot be scheduled; they must wait until an older unit executable finishes execution and returns its resource credential (i.e., releases the resource) to the asynchronous resource pool before they can request it again. As another example, if a unit executable does not need any physical resources but still needs to successfully obtain a buffer credential to be scheduled, and if the unit executable fails to obtain a buffer credential, it must wait until an older unit executable retires and returns its buffer credential.
[0026] For example, a unit executable might require credentials for multiple physical resources. If an instruction needs to read data from a specific address into a register, the corresponding unit executable requires at least one queue of read port resource credentials and one queue of physical register resource credentials. Therefore, when this unit executable is scheduled from the decoding unit, it needs to request both a read port resource credential and a physical register resource credential simultaneously. If either the read port resource credential queue or the physical register resource credential queue is empty at this time, scheduling of the unit executable will be stopped until a credential of that type is returned.
[0027] Thus, the inventors of this disclosure have discovered that, under this mechanism, if a unit execution code fails to return the previously applied certificate after completing its entire lifecycle retirement, the certificate for that resource will be lost, affecting the scheduling of other unit execution codes that need to use this resource, resulting in a decrease in overall performance, and in extreme cases, locking the decoding unit, causing it to become unschedulable and resulting in a system crash.
[0028] The inventors of this invention also discovered that a verification method for lost credentials in asynchronous resource pools can be derived through waveform analysis. The waveform analysis method involves using simulation tools to simulate hardware behavior, ultimately generating a waveform diagram containing the specific values of the signal at each unit of time. Thus, in the extreme case of system deadlock, it is generally possible to determine which specific resource credential queue was lost, and then, by using the currently scheduled and retired unit execution codes, the specific source of the credential loss can be deduced from which unit execution code caused the loss. This extreme case refers to a resource pool exhaustion, causing subsequent work to be unable to continue requesting resources and thus being suspended indefinitely.
[0029] The inventors of this disclosure further discovered that if a small number of vouchers are lost during the simulation but do not cause a lockout, the loss can only be detected by polling the capacity of each voucher queue after the simulation ends. However, asynchronous resource pools exacerbate the difficulty of localization because the application and release of each resource voucher queue are asynchronous in the simulation waveform, making it difficult to determine which unit's execution code caused the loss at what moment. The verification convergence time is relatively long, making rapid localization impossible.
[0030] At least one embodiment of this disclosure provides a verification method for a processor, comprising: creating a resource pool model corresponding to a resource pool of the processor; monitoring the state information changes of a credential queue module to be tested in the resource pool during the processor's processing of multiple objects to perform tasks; in response to monitoring the state information changes of the credential queue module, using the resource pool model to obtain and record monitoring state information based on the state information changes of the credential queue module; and verifying the resource pool based on the monitoring state information of the resource pool model.
[0031] At least one embodiment of this disclosure also provides a verification system corresponding to the above verification method. The verification system includes a monitor and a resource pool model. The monitor is configured to monitor changes in the state information of the credential queue module during the process of the processor handling multiple objects to execute tasks. The resource pool model is configured to be created corresponding to a resource pool and to, in response to changes in the state information of the credential queue module, acquire and record monitoring state information based on these changes, and verify the resource pool based on the monitoring state information.
[0032] The verification method or system of the above embodiments of this disclosure achieves resource monitoring in the full simulation process by performing a complete abstract model of the resource pool (e.g., an asynchronous resource pool), and checks the voucher queue through the established model to verify the resource pool. This significantly improves the verification convergence speed, and also achieves low coupling, good project portability, and saves manpower. For example, at least one embodiment of this disclosure can determine whether voucher loss has occurred in the resource pool, thereby quickly locating the location and type of voucher loss in the resource pool with good accuracy, saving location time, and significantly improving the verification convergence speed of voucher loss problems in the resource pool.
[0033] Figure 1 This is a schematic diagram of a verification system for a processor provided for some embodiments of this disclosure.
[0034] For example, such as Figure 1 As shown, at least one embodiment of the present disclosure provides a verification system 200 for a processor 100, which includes a monitor 210 and a resource pool model 220.
[0035] For example, such as Figure 1As shown, the processor 100 includes a resource pool, such as an asynchronous resource pool 110. The asynchronous resource pool 110 includes a credential queue module to be tested. The credential queue module includes N resource credential queues 111 and a buffer credential queue 112. The N resource credential queues 111 store resource credentials representing N types of physical resource scheduling that can be allocated to the execution task, and each resource credential queue 111 corresponds to one type of physical resource (which can be simply referred to as a resource). N is an integer greater than or equal to 1. The buffer credential queue 112 stores buffer credentials representing the dispatch status of the execution task. For example, the execution task may include instructions, and the dispatch status may include scheduling.
[0036] For example, such as Figure 1 As shown, monitor 210 is configured to monitor the status information changes of the credential queue module during the process of processor 100 processing multiple objects to perform tasks. Resource pool model 220 (also referred to as resource pool model module) is configured to be created corresponding to asynchronous resource pool 110, and resource pool model 220 is configured to, in response to the status information changes of the credential queue module, acquire and record monitoring status information based on the status information changes of the credential queue module, and verify asynchronous resource pool 110 based on the monitoring status information. For example, the monitoring status information is information consistent with the real-time status of the credential queue module acquired through monitoring.
[0037] Therefore, the verification system of at least one embodiment of this disclosure realizes resource monitoring in the full simulation process by performing a complete abstract model of the resource pool (e.g., the asynchronous resource pool), and checks the voucher queue through the established model to verify the asynchronous resource pool. This greatly improves the verification convergence speed, and achieves low coupling, good project portability, and saves manpower.
[0038] In some examples, N is an integer greater than or equal to 2, meaning that the asynchronous resource pool 110 of processor 100 has multiple resource credential queues 111. For example, Figure 1 The three resource credential queues 111 shown are resource credential queue 1, resource credential queue 2, and resource credential queue 3, respectively. Resource credential queue 1 corresponds to resource 1, resource credential queue 2 corresponds to resource 2, and resource credential queue 3 corresponds to resource 3. Of course, this is merely an example to facilitate the description of the embodiments of this disclosure and does not limit the scope of protection of the embodiments of this disclosure.
[0039] For example, such as Figure 1As shown, the processor 100 also includes a decoding unit 120, a scheduler 140, and an execution unit 130. The decoding unit 120 is configured to obtain one or more unit execution codes (Uops) by decoding instructions; for example, an instruction is used to execute a task. The scheduler 140 is configured to request credentials from the credential queue module based on the resources required by each object unit execution code and schedule the object unit execution code accordingly. The execution unit 130 executes the object unit execution code based on the credentials corresponding to the object unit execution code.
[0040] For example, scheduler 140 is connected to unit execution code buffer 131 of execution unit 130 to schedule object unit execution codes to unit execution code buffer 131 of execution unit 130 during the credential request phase of asynchronous resource pool 110.
[0041] It should be noted that, in the embodiments of this disclosure, for the sake of clarity and conciseness, the current unit execution code corresponding to one or more unit execution codes is referred to as the object unit execution code. This terminology does not limit the scope of protection of the embodiments of this disclosure.
[0042] It should be noted that, for clarity and brevity, the embodiments of this disclosure do not show all the constituent units of the processor 100. To implement some necessary functions of the processor 100, those skilled in the art can provide and configure other constituent units (not shown) according to specific needs, and the embodiments of this disclosure do not limit this. It should be noted that the processor 100 applicable to the verification system or method of the embodiments of this disclosure can be a central processing unit (CPU). For example, the following description mainly uses the processor 100 as a CPU, but it can also be other types of processors, which will not be exhaustively listed or elaborated upon here.
[0043] In some examples, the verification system or method of the embodiments of this disclosure is not limited to asynchronous resource pools; for example, the resource allocation and release times can be asynchronous or synchronous. This document mainly uses the asynchronous resource pool 110 of processor 100 as an example for illustration. However, the verification system or method of the embodiments of this disclosure does not limit whether the applicable resource pool is asynchronous or synchronous, and the embodiments of this disclosure do not limit the number of credential queues in the resource pool or the capacity of the credential queues, which will not be elaborated here.
[0044] In some examples, resource pool model 220 is configured to determine whether asynchronous resource pool 110 has lost credentials based on monitoring status information, in order to verify asynchronous resource pool 110.
[0045] Therefore, the embodiments of this disclosure achieve resource monitoring in the full simulation process by performing a complete abstract model of the asynchronous resource pool and checking the voucher queue through the created model. This enables the determination of whether voucher loss has occurred in the asynchronous resource pool, thereby quickly locating the location and type of voucher loss in the asynchronous resource pool with good accuracy, saving location time, and significantly improving the verification convergence speed of voucher loss problems in the asynchronous resource pool.
[0046] In some examples, during the credential request phase of asynchronous resource pool 110, in response to scheduler 140 scheduling object unit execution codes to unit execution code buffer 131 of execution unit 130, the number of buffered credentials in buffered credential queue 112 and / or the number of resource credentials in at least one resource credential queue 111 among N resource credential queues 111 is reduced.
[0047] For example, if the physical resources required by the object unit executable are empty (i.e., the unit executable does not require any physical resources), then the object unit executable needs to request a buffer credential, meaning the number of buffer credentials in buffer credential queue 112 will be decremented by one. As another example, if the physical resources required by the object unit executable include at least one physical resource, then the object unit executable needs to request at least one corresponding resource credential and one buffer credential, meaning the number of buffer credentials in buffer credential queue 112 will be decremented by one, and the number of resource credentials in at least one corresponding resource credential queue 111 will also be decremented by one. This is merely exemplary and not a limitation of this disclosure.
[0048] In some examples, during the credential release phase of the asynchronous resource pool 100, in response to the execution unit 130 executing the object unit execution code and retiring the object unit execution code, the number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in at least one of the N resource credential queues 111 increases.
[0049] In some examples, the decoding unit 120 decodes the target instruction to obtain one or more corresponding unit execution codes and learns the resources required for each unit execution code. Then, the unit execution code enters the scheduler 140, which checks whether there are enough vouchers in each voucher queue in the current voucher queue module based on the resources required by the unit execution code.
[0050] If the check passes, meaning that there are enough vouchers available in each voucher queue in the current voucher queue module, then the unit execution code can be successfully scheduled to the unit execution code buffer 131 of the execution unit 130, and the number of vouchers in the corresponding voucher queue will decrease.
[0051] If the check fails, meaning there are not enough vouchers available in the voucher queue module, the unit execution code cannot be scheduled at the moment. It must wait until an older unit execution code is executed and the corresponding resource voucher is returned so that there are enough corresponding resource vouchers available before requesting and scheduling can proceed.
[0052] For example, after each resource is used up, the resource certificate is returned to the asynchronous resource pool 110, and after the unit execution code has used all the required resources to complete the execution, it is retired from the unit execution code buffer 131 and the buffer certificate is released.
[0053] In some examples, if the sum of the number of remaining resource credentials in the resource credential queue corresponding to the physical resources required by the object unit execution code in the N resource credential queues of the asynchronous resource pool 110 and the number of buffer credentials being returned and corresponding to the physical resources required by the object unit execution code in the buffer credential queue is greater than zero, then the object unit execution code can be successfully scheduled to the unit execution code buffer 131 of the execution unit 130, that is, the corresponding resource credential and buffer credential are obtained at this time.
[0054] Of course, this is merely an example and is not a limitation of this disclosure. The mechanism by which the scheduler 140 determines whether the object unit execution code can be scheduled normally (i.e., the standard for determining whether there are enough available credentials in each credential queue of the credential queue module) is not limited to this. For example, the scheduler 140 may also determine whether the object unit execution code is scheduled simply by judging whether the number of remaining resource credentials in the resource credential queue corresponding to the physical resources required by the object unit execution code in the N resource credential queues of the asynchronous resource pool 110 is sufficient. This will not be elaborated here.
[0055] In some examples, monitor 210 is configured to monitor the number of buffered credentials in buffered credential queue 112 and / or the number of resource credentials in N resource credential queues 111 during the process of processor 100 processing multiple object execution tasks, in order to monitor changes in the status information of the credential queue module.
[0056] Therefore, the embodiments of this disclosure monitor the status information changes of the credential queue module by monitoring the number of credentials in the credential queue module, thus accurately and conveniently realizing the monitoring of processor resources.
[0057] In some examples, the verification system of the embodiments of this disclosure is not limited to scenarios where instructions are decoded into one or more unit executable codes, but can also be applied to scenarios where instructions are not decomposed into unit executable codes.
[0058] Figure 2 This is a schematic diagram illustrating monitoring status information consistent with the real-time status of the credential queue module, provided in some embodiments of this disclosure.
[0059] For example, such as Figure 1 As shown, the resource pool model 220 is connected to the monitor 210. When the monitor 210 detects a change in the number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in the N resource credential queues 111, it sends the real-time monitored number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 back to the resource pool model 220. This allows the resource pool model to update and record the monitoring status information in real time, ensuring that the updated monitoring status information is consistent with the real-time status of the credential queue module. For example, as... Figure 2 The diagram shows the principle of monitoring status information recorded by resource pool model 220.
[0060] Therefore, in the embodiments of this disclosure, the monitor can set a feedback state when it detects a change in the number of vouchers in any queue of the voucher queue module, and the monitor notifies the resource pool model to update the relevant information. This ensures that the status information recorded by the resource pool model is always consistent with the status of the queues in the voucher queue module under test, that is, the status of all voucher queues is obtained in real time. This guarantees that the results of checks, such as voucher loss, can represent the true status of the object under test. Since the voucher queue is not necessarily requested or released every clock cycle (e.g., the clock cycle is the clock cycle of the decoding unit, or it could be the clock cycle of the processor), the resource pool model does not need to record every clock cycle when monitoring changes in the number of vouchers is not required to continuously monitor every clock cycle, thereby reducing unnecessary overhead.
[0061] For example, such as Figure 1 As shown, the monitor 210 is connected to the buffer credential queue 112, the N resource credential queues 111, and the scheduler 140, respectively. In response to the credential request phase, the monitor 210 monitors the buffer credential queue 112, the N resource credential queues 111, and the scheduler 140 to monitor the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the processor 100's processing of multiple object execution tasks. Similarly, in response to the credential release phase, the monitor 210 monitors the scheduler 140 and / or the buffer credential queue 112 and the N resource credential queues 111 to monitor the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the processor 100's processing of multiple object execution tasks.
[0062] Therefore, the embodiments of this disclosure, by monitoring the scheduler during the credential application stage, can not only accurately monitor the resource status but also avoid the latency issues caused by monitoring from the scheduling bus. Furthermore, it facilitates scalability and real-time maintainability; for example, it can be extended to check the accuracy of the scheduler's dispatching. During the credential release stage, the embodiments of this disclosure can obtain resource release status not only by monitoring the credential queue but also by monitoring the scheduler, which is not only accurate but also accelerates the retrieval of status information.
[0063] In some examples, the unit execution code buffer 131 of execution unit 130 is connected to the buffer credential queue 112, and the buffer credential queue 112 is connected to the scheduler 140. Thus, after execution unit 130 executes the object unit execution code and retires the object unit execution code, the buffer credential is returned, i.e., the number of buffer credentials in buffer credential queue 112 increases.
[0064] In some examples, the verification system 200 also includes a first interface and N second interfaces, such as Figure 1 As shown by the dashed line. Monitor 210 is connected to buffer credential queue 112 through a first interface, and monitor 210 is connected to N resource credential queues 111 through N second interfaces respectively.
[0065] In some examples, the monitor 210 is part of the verification environment and is software code, while the first interface and / or the second interface are hardware; the entire verification environment is a combination of software and hardware. For example, in front-end verification, the decoding and execution units of the processor to be verified refer to code describing digital circuits. This is merely exemplary and not a limitation of this disclosure.
[0066] In some examples, such as Figure 2 As shown, the monitoring status information includes at least one of the following: the number of N resource credential queues 111, the number of buffer credential queues 112, the total capacity of buffer credential queues 112, the total capacity of each of the N resource credential queues 111, the scheduling order of multiple unit execution codes, the numbering information of multiple unit execution codes, the number of used resource credentials and the number of remaining resource credentials for each of the N resource credential queues 111, the type of resource credential used by each of the multiple unit execution codes, the application time and release time of the resource credential used by each of the multiple unit execution codes, the number of used buffer credentials and the number of remaining buffer credentials in buffer credential queues 112, and the application time and release time of the buffer credential used by each of the multiple unit execution codes.
[0067] In some examples, the monitoring status information may also include: the type and number of resource credentials corresponding to the physical resources occupied by the unit execution codes according to their numbers during scheduling, such as... Figure 2As shown. For example, embodiments of this disclosure model the buffer credential queue, including the changes in the number of management credentials and the types and numbers of resource credentials corresponding to the physical resources occupied by the unit execution codes according to the numbers of multiple unit execution codes during scheduling. This facilitates providing more detailed information for location purposes during subsequent inspection and reporting.
[0068] Of course, this is merely an example and is not a limitation of this disclosure. For example, other information required for checking constraints of the model may be adjusted as needed, which will not be elaborated here.
[0069] For example, Figure 2 The example shows three unit executable codes numbered Uop A, Uop B, and Uop C, in sequential order. This is merely exemplary and not a limitation of the embodiments of this disclosure; any unique identifier for each unit executable code is sufficient to facilitate identification of its lifecycle in the decoding and execution units. It should be noted that... Figure 2 The number shown is merely a schematic diagram; in practice, a number with a fixed bit width can be used for encoding.
[0070] Some embodiments of this disclosure acquire and record more information than the credential queue module under test itself through a monitor and resource pool model. This can assist in, for example, locating lost credentials, managing only the number of credentials in the credential queue module under test, or lacking the concept of unit execution code numbers in the credential queue module under test.
[0071] For example, such as Figure 2 As shown, Figure 2 The left side of the diagram represents the credential application process, with UopA, UopB, and UopC being scheduled sequentially. For example, N resource credential queues can be categorized into three: Resource credential queue 1 corresponds to resource 1, Resource credential queue 2 corresponds to resource 2, and Resource credential queue 3 corresponds to resource 3. UopA requires resources 1 and 3, UopB requires resources 1 and 2, and UopC requires resources 1, 2, and 3. The resource pool model 220, based on monitoring by the monitor 210, records the scheduling status of unit execution codes (e.g., the order of unit execution code scheduling) and the resource categories required by each unit execution code to obtain monitoring status information. For example... Figure 2 The "0" in the code indicates that the unit's executable code does not need to use this type of resource.
[0072] For example, such as Figure 2 As shown, Figure 2 The right side of the diagram represents the process of releasing the certificate, from... Figure 2As can be seen, the release order of each unit execution code is not fixed for each resource, and the release time may also differ from the return time of the buffer credential. However, the return time of the resource credential for the same unit execution code will not be later than the return time of the buffer credential. Because the buffer credential is released only after the unit execution code has used all the required resources and completed execution, meaning the buffer credential of the unit execution code will not be later than its retirement release, the retirement order of the buffer credential queue is consistent with the scheduling order of multiple unit execution codes. For example, as... Figure 2 As shown, along the left-right or vertical direction of the drawing, the left side represents earlier time, and the right side represents later time. Vertical alignment indicates the same moment. This is merely a schematic diagram and is not intended to limit this disclosure.
[0073] The inventors of this disclosure further discovered that, ideally, if the resource pool model 220 could directly obtain the original unit execution code number of the resource credential, it could effectively identify the actual location of the error. However, in practice, obtaining this information is quite difficult because, in order to achieve functional decoupling, the specific unit execution code has been simplified into a resource concept in subsequent execution units and memory management units, and these resource concepts are completely equivalent. In other words, if one wants to know exactly which unit execution code released a particular resource credential, it is necessary to extract a large number of signals from the downstream unit to which the resource belongs and perform multiple mappings. This relies excessively on the code implementation of specific projects, resulting in an excessive workload and poor project portability.
[0074] In some examples, the resource pool model 220 includes a first credential loss check module 221. The first credential loss check module 221 is configured to obtain the current release number of N types of resource credentials at retirement of at least one of the multiple unit execution codes based on the monitoring status information, and to determine whether the asynchronous resource pool 110 has experienced credential loss based on the current release number of N types of resource credentials at retirement of at least one of the multiple unit execution codes and the type and number of resource credentials corresponding to the physical resources occupied by the multiple unit execution codes during scheduling, so as to obtain the credential loss verification result.
[0075] Therefore, the embodiments of this disclosure utilize a resource pool model to perform equivalent processing on credentials of the same type of resources, that is, only the quantity is recorded and not the specific source. This allows for the detection of unit execution codes that have not been returned before the resource credentials were applied for during the complete lifecycle. The workload of the inspection is small and the portability is good.
[0076] For example, Figure 2The UopC highlighted in the example represents an instance where UopC has experienced a loss of resource credentials (e.g., failure to return occupied resource 2), meaning that UopC should have returned resource 2 at some point but actually failed to do so. This is merely an example and illustration for the purpose of clarifying the description of the embodiments of this disclosure and does not constitute a limitation on the embodiments of this disclosure.
[0077] Figure 3 This is a schematic diagram of the module composition of the first credential loss check module of the resource pool model provided in some embodiments of this disclosure.
[0078] For example, such as Figure 3 As shown, the first credential loss check module 221 of the resource pool model 220 includes a counting unit 221a, a summing unit 221b, a comparison unit 221c, and a judgment unit 221d.
[0079] The counting unit 221a is configured to: count the current release number of each type of resource certificate in the N types of resource certificates when the current object unit execution code retires in the retirement order of the multiple unit execution codes, and obtain the current release number of the N types of resource certificates corresponding to the object unit execution code.
[0080] For example, in Figure 2 In the example, the retirement order of the three unit executables is UopA, UopB, and UopC in that order. For example, when UopA retires, the current release counts of the three types of resource credentials (in the order of resource 1, 2, and 3, as will be below) are 2, 0, and 2, respectively. This means that when UopA retires, resource 1 has been returned two times, resource 2 has not been returned, and resource 3 has been returned two times.
[0081] The summation unit 221b is configured to: sum the current release count of each type of resource certificate in the N types of resource certificates with the remaining release count of the corresponding category of resource certificates in the N types of resource certificates, to obtain the total release count of each type of resource certificate in the N types of resource certificates corresponding to the object unit execution code; and subtract the number of resource certificates corresponding to the physical resources occupied by the object unit execution code during scheduling from the total release count of each type of resource certificate in the N types of resource certificates, to obtain N difference values. The comparison unit 221c is configured to compare the N difference values with zero.
[0082] The judgment unit 221d is configured as follows: in response to all N differences being not less than zero, corresponding to the object unit execution code passing the retirement check, each of the N differences is used as the remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the next object unit execution code, wherein the remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the first object unit execution code is zero; and in response to at least one of the N differences being less than zero, corresponding to the object unit execution code failing the retirement check, the current object unit execution code and the type of lost resource certificate are reported, thereby obtaining the certificate loss verification result.
[0083] For example, in Figure 2 In the example, when UopA retires, the remaining release counts of the three types of resource credentials are 0, 0, and 0, respectively, because UopA is the first object unit execution code. Since the current release counts of the three types of resource credentials are 2, 0, and 2, respectively (meaning the current release counts of resource credentials corresponding to resource 1, resource 2, and resource 3 are 2, 0, and 2), the total release counts of the three types of resource credentials are 2, 0, and 2. Furthermore, subtracting the number of resource credentials corresponding to the physical resources occupied by UopA during scheduling (1, 0, and 1) from the total release counts of the three types of resource credentials (2, 0, and 2) yields three differences: 1, 0, and 1. Therefore, the remaining release counts of the three types of resource credentials when the next object unit execution code retires (i.e., when UopB retires) are 1, 0, and 1, and the check passes.
[0084] For example, in Figure 2 In the example, when UopB retires, the current release counts of the three types of resource credentials are 0, 1, and 0 respectively (i.e., one resource 2 has been returned, but resources 1 and 3 have not been returned). The remaining release counts of the three types of resource credentials at this time are 1, 0, and 1. Therefore, the total release counts of the three types of resource credentials at this time are 1, 1, and 1 respectively. Since the number of resource credentials corresponding to the physical resources occupied by UopB during scheduling is 1, 1, and 0, subtracting the number of resource credentials corresponding to the physical resources occupied by UopB during scheduling (1, 1, and 0) from the total release counts of the three types of resource credentials (1, 1, and 1) yields three differences, which are 0, 0, and 1 respectively. The check passes.
[0085] For example, in Figure 2In the example, when UopC retires, the current release counts of the three types of resource credentials are 1, 0, and 0 respectively (i.e., one resource 1 has been returned, and resources 2 and 3 have not been returned). The remaining release counts of the three types of resource credentials are 0, 0, and 1. Therefore, the total release counts of the three types of resource credentials are 1, 0, and 1 respectively. Since the number of resource credentials corresponding to the physical resources occupied by UopC during scheduling is 1, 1, and 1, subtracting the number of resource credentials corresponding to the physical resources occupied by UopC during scheduling (1, 1, and 1) from the total release counts of the three types of resource credentials (1, 0, and 1) yields three differences: 0, -1, and 0 respectively. Therefore, the check fails, and the result is that the resource credential check for resource 2 fails. A report is then sent to UopC indicating that the resource credential for resource 2 has been lost, thus the detection succeeds.
[0086] The embodiments of this disclosure utilize a resource pool model to perform equivalence processing on credentials of the same type of resources. By obtaining and reporting the location where the error was first discovered, the inspection results of the unit execution code that has not returned the previously applied credentials within the entire lifecycle can be obtained. The inspection workload is small, the portability is good, and a better balance can be achieved between inspection accuracy and efficiency.
[0087] In some examples, the number of multiple unit execution codes can be denoted as M, where M is greater than 2. For obtaining the current release number of N-type resource credentials at retirement for at least one of the multiple unit execution codes based on monitoring status information, at least one of these unit execution codes is less than or equal to M; for example, it can be one or more. For instance, during the equivalence processing of credentials for the same type of resource using a resource pool model, when checking and verifying according to the retirement order of the unit execution codes, the check and judgment can be completed at the retirement of M unit execution codes, or it can be done at the retirement of the i-th (i greater than or equal to 1 and less than M) unit execution code, thereby identifying the location of the error and reporting it. Therefore, unit execution codes after the i-th unit execution code do not need to be checked or judged.
[0088] In some examples, such as Figure 3 As shown, the resource pool model 220 also includes a second credential loss check module 222. The second credential loss check module 222 is connected to the first credential loss check module 221. The second credential loss check module 222 is configured to: in response to a check failure corresponding to the current object unit execution code upon retirement, retrieve at least one target unit execution code that used the lost resource credential within a preset time before the current object unit execution code's retirement, according to the retirement order of the buffered credentials in the buffered credential queue 112, to obtain the credential loss verification result. The retirement order of the buffered credentials in the buffered credential queue 112 is consistent with the scheduling order of the multiple unit execution codes.
[0089] Therefore, in addition to reporting the number of the failed unit execution code and the type of resource credential, the embodiments of this disclosure can also report the numbers of all unit execution codes that have used this type of resource credential within a previous time window, according to the order of the buffer credential queue. Since the actual error location is equal to or before the currently erroneous unit execution code, unit execution codes that have not used this type of resource can be skipped during positioning, thereby accelerating positioning and improving positioning accuracy and efficiency.
[0090] Figure 4 This is a schematic diagram illustrating monitoring status information consistent with the real-time status of the credential queue module, provided for other embodiments of this disclosure.
[0091] For example, such as Figure 4 As shown, when UopA retires, the remaining release counts of the three types of resource credentials are 0, 0, and 0 respectively, because UopA is the first object unit execution code. When UopA retires, the current release counts of the three types of resource credentials are 2, 1, and 2 respectively, so the total release counts of the three types of resource credentials are 2, 1, and 2 respectively. The number of resource credentials corresponding to the physical resources occupied by UopA during scheduling are 1, 0, and 1 respectively, resulting in three corresponding differences of 1, 1, and 1. Therefore, the returned resources are no less than the occupied resources, and the check passes.
[0092] For example, such as Figure 4 As shown, when UopB retires, the current release counts of the three types of resource credentials are 0, 0, and 0. The remaining release counts of the three types of resource credentials are 1, 1, and 1. Therefore, the total release counts of the three types of resource credentials are 1, 1, and 1, respectively. Since the number of resource credentials corresponding to the physical resources occupied by UopB during scheduling are 1, 1, and 0, the corresponding three differences are 0, 0, and 1. Therefore, the returned resources are no less than the occupied resources, and the check passes.
[0093] For example, such as Figure 4 As shown, when UopC retires, the current release counts of the three types of resource credentials are 1, 0, and 0. The remaining release counts of the three types of resource credentials are 0, 0, and 1. Therefore, the total release counts of the three types of resource credentials are 1, 0, and 1, respectively. Since the number of resource credentials corresponding to the physical resources occupied by UopC during scheduling are 1, 1, and 1, the corresponding three differences are 0, -1, and 0. Therefore, the check fails, and the result is that UopC has lost the resource credential for resource 2.
[0094] The inventors of this disclosure also discovered that, as Figure 4 As shown, if we assume Figure 4The dashed box outlines UopB, not UopC. This indicates an example where UopB has lost its resource credential (e.g., failed to return the occupied resource 2). This means that UopB should have returned resource 2 at a certain time, but it failed to do so. Therefore, the check result of checking and reporting that UopC has lost its resource credential for resource 2 may not match the actual situation. In reality, UopB might have lost its credential, but the error report still points to UopC. This means it's impossible to identify which UopC the previously returned resource actually belonged to. Therefore, embodiments of this disclosure can use the second credential loss check module of the resource pool model to simultaneously report the unit execution code number and resource credential type of the failed check, as well as the numbers of all unit execution codes that used this type of resource credential within a previous time window, according to the order of the buffer credential queue. This improves the positioning accuracy and efficiency in the above scenario, eliminates the need for a multi-level mapping scheme, reduces the amount of checking, and accelerates positioning.
[0095] In some examples, the preset time (i.e., time window) before the current object unit executable code retires can reflect or describe the number of older unit executable codes that need to be located and reported. For example, the longer the preset time, the more older unit executable codes will be located, and vice versa. The embodiments of this disclosure do not impose limitations or requirements on the above-mentioned preset time (i.e., time window), which can be determined comprehensively based on the amount of information to be reported and the difficulty of location, and will not be elaborated here.
[0096] Figure 5 This is a flowchart illustrating a verification method for a processor, provided for some embodiments of this disclosure.
[0097] like Figure 5 As shown, at least one embodiment of this disclosure provides a verification method for a processor, including steps S1 to S4.
[0098] Step S1: Create a resource pool model 220 corresponding to the resource pool (e.g., asynchronous resource pool 110).
[0099] Step S2: Monitor the status information changes of the voucher queue module during the process of processor 100 processing multiple objects to execute tasks.
[0100] Step S3: In response to changes in the status information of the monitoring voucher queue module, use resource pool model 220 to obtain and record the monitoring status information based on the changes in the status information of the voucher queue module.
[0101] Step S4: Verify the resource pool (e.g., asynchronous resource pool 110) based on the monitoring status information of resource pool model 220.
[0102] The verification method of at least one embodiment of this disclosure realizes resource monitoring in the full simulation process by performing a complete abstract model of the resource pool (e.g., an asynchronous resource pool), and checks the voucher queue through the established model to verify the asynchronous resource pool. This greatly improves the verification convergence speed, and achieves low coupling, good project portability, and saves manpower.
[0103] In some examples, for step S2, the status information changes of the credential queue module during the process of the processor 100 processing multiple object execution tasks include the following process or step S21: the monitor 210 monitors the number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the process of the processor 100 processing multiple object execution tasks, so as to realize the status information changes of the credential queue module.
[0104] Therefore, the verification method of the present disclosure monitors the status information changes of the voucher queue module by monitoring the number of vouchers in the voucher queue module, thus accurately and conveniently monitoring the processor resources.
[0105] In some examples, for step S21, the monitor 210 monitors the number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the process of the processor 100 processing multiple object execution tasks, including the following processes or steps:
[0106] In response to the credential request phase, the monitor 210 monitors the buffer credential queue 112 and the N resource credential queues 111, as well as the monitor scheduler 140, to monitor the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the processor 100's processing of multiple object execution tasks; and in response to the credential release phase, the monitor 210 monitors the scheduler 140 and / or monitors the buffer credential queue 112 and the N resource credential queues 111, to monitor the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 during the processor 100's processing of multiple object execution tasks.
[0107] Therefore, the embodiments of this disclosure, by monitoring the scheduler during the credential application stage, can not only accurately monitor the resource status but also avoid the latency issues caused by monitoring from the scheduling bus. Furthermore, it facilitates scalability and real-time maintainability; for example, it can be extended to check the accuracy of the scheduler's dispatching. In addition, the embodiments of this disclosure, during the credential release stage, can obtain resource release status not only by monitoring the credential queue but also by monitoring the scheduler, which is not only accurate but also accelerates the retrieval of status information.
[0108] Figure 6 for Figure 5 A flowchart illustrating the execution process of step S3 in the processor verification method. For example, as... Figure 6 As shown, an example of step S3 includes at least steps S31 and S32.
[0109] Step S31: In response to the detection of a change in the number of buffer credentials in buffer credential queue 112 and / or the number of resource credentials in N resource credential queues 111, the monitor 210 sends the real-time monitored number of buffer credentials in buffer credential queue 112 and / or the number of resource credentials in N resource credential queues 111 back to the resource pool model 220.
[0110] Step S32: In response to the monitor 210 transmitting the number of buffered credentials in the buffered credential queue 112 and / or the number of resource credentials in the N resource credential queues 111 back to the resource pool model 220, the resource pool model 220 updates and records the monitoring status information in real time, so that the updated monitoring status information is consistent with the real-time status of the credential queue module.
[0111] Therefore, some embodiments of this disclosure do not require recording for each clock cycle, thereby reducing unnecessary overhead.
[0112] In some examples, for step S4, verifying the asynchronous resource pool 110 based on the monitoring status information of the resource pool model 220 includes the following process or step S41: determining whether the asynchronous resource pool 110 has lost its credentials based on the monitoring status information.
[0113] The verification method of the embodiments of this disclosure can determine whether a credential has been lost in the asynchronous resource pool, thereby quickly locating the location and type of credential loss in the asynchronous resource pool with good accuracy, saving location time, and significantly improving the convergence speed of verification of credential loss problems in asynchronous resource pools.
[0114] In some examples, the verification method further includes the following processes or steps: for the credential request phase of the asynchronous resource pool 110, in response to the scheduler 140 scheduling the object unit execution code to the unit execution code buffer 131 of the execution unit 130, the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in at least one resource credential queue 111 among the N resource credential queues 111 is reduced; and for the credential release phase of the asynchronous resource pool 110, in response to the execution unit 130 executing the object unit execution code and retiring the object unit execution code, the number of buffered credentials in the buffer credential queue 112 and / or the number of resource credentials in at least one resource credential queue 111 among the N resource credential queues 111 is increased.
[0115] Figure 7 This is a flowchart illustrating an execution process of step S41 of the verification method for a processor provided in some embodiments of this disclosure. For example, as... Figure 7 As shown, an example of step S41 includes at least steps S411 and S412.
[0116] Step S411: Based on the monitoring status information, obtain the current release number of N-type resource credentials at retirement for at least one of the multiple unit execution codes.
[0117] Step S412: Based on the current release number of N-type resource credentials at the retirement of at least one of the multiple unit execution codes and the type and number of resource credentials corresponding to the physical resources occupied by the multiple unit execution codes during scheduling, determine whether the asynchronous resource pool has experienced credential loss, and obtain the credential loss verification result.
[0118] Figure 8 This is a flowchart of an execution process of step S412 of the verification method for a processor provided in some embodiments of this disclosure.
[0119] For example, such as Figure 8 As shown, in step S412, the following steps S4121 to S4124 are performed in turn when the current object unit execution code retires, according to the retirement order of the multiple unit execution codes.
[0120] Step S4121: Count the current release count of each type of resource certificate in the N types of resource certificates, and obtain the current release count of the N types of resource certificates corresponding to the object unit execution code.
[0121] Step S4122: Sum the current release count of each type of resource certificate in the N types of resource certificates with the remaining release count of the corresponding type of resource certificate in the N types of resource certificates to obtain the total release count of each type of resource certificate in the N types of resource certificates corresponding to the object unit execution code.
[0122] Step S4123: Subtract the number of resource certificates corresponding to the physical resources occupied by the object unit execution code during scheduling from the total number of releases of each type of resource certificate in the N types of resource certificates, to obtain N difference values.
[0123] Step S4124: In response to all N differences being not less than zero, the check of the object unit execution code at retirement is passed, and each of the N differences is used as the remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the next object unit execution code. The remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the first object unit execution code is zero. In response to at least one of the N differences being less than zero, the check of the object unit execution code at retirement is failed, and the current object unit execution code and the type of lost resource certificate are reported to obtain the certificate loss verification result.
[0124] The verification method of the embodiments of this disclosure uses a resource pool model to perform equivalence processing on credentials of the same type of resources. It can obtain the check results of unit execution codes that have not returned previously applied credentials within the entire life cycle. The check workload is small, the portability is good, and a better balance can be achieved between check accuracy and efficiency.
[0125] In some examples, the verification method of embodiments of this disclosure further includes the following process or steps: in response to the failure of the check corresponding to the current object unit execution code at retirement, according to the retirement order of the buffered credentials in the buffered credential queue, at least one target unit execution code that has used the lost resource credentials within a preset time before the retirement of the current object unit execution code, so as to obtain the credential loss verification result, wherein the retirement order of the buffered credentials in the buffered credential queue is consistent with the scheduling order of the multiple unit execution codes.
[0126] The verification method of the embodiments of this disclosure can be implemented through a resource pool model. While reporting the number of the unit execution code that failed the check and the type of resource certificate, it can also report the numbers of all unit execution codes that have used this type of resource certificate in the previous time window in the order of the buffer certificate queue. This can improve the positioning accuracy and efficiency, reduce the amount of checking, and speed up the positioning.
[0127] It should be noted that, in the embodiments of this disclosure, the verification system 200 for the processor may include more or fewer modules, and the connection relationship between the modules is not limited and can be determined according to actual needs. The specific configuration of each module is not limited.
[0128] The modules in the above embodiments can be configured as software, hardware, firmware, or any combination thereof to perform specific functions. For example, these modules may correspond to dedicated integrated circuits, pure software code, or modules combining software and hardware.
[0129] It should be noted that although the above description of the verification system for the processor divides it into modules for performing corresponding processes, those skilled in the art will understand that the processes performed by each module can also be performed in the test system without any specific module division or clear demarcation between the modules.
[0130] It should also be noted that the technical effects of the processor verification method in some embodiments can be referred to the technical effects of the processor verification system provided in the above embodiments of this disclosure, and will not be repeated here.
[0131] Figure 9 This is a schematic diagram of the structure of an electronic device provided in at least one embodiment of the present disclosure. The electronic device 300 includes a processing unit 310 (also referred to as a processor 310) and a storage unit 320 (also referred to as a memory 320). The storage unit 320 stores a computer program. When the computer program is executed by the processing unit 310, it implements the verification method of at least some embodiments of the present disclosure.
[0132] The electronic devices in the embodiments of this disclosure may include, but are not limited to, mobile terminals such as laptops and tablets, and fixed terminals such as desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0133] For example, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For instance, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. When the computer program is executed by a processing unit, the verification method of embodiments of this disclosure is performed.
[0134] It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In embodiments of this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0135] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0136] It should be noted that, in the embodiments of this disclosure, the specific functions and technical effects of the electronic device 300 can be referred to the description of the verification system and verification method above, and will not be repeated here.
[0137] The following points need to be explained:
[0138] (1) The accompanying drawings of the embodiments of this disclosure only involve the structures involved in the embodiments of this disclosure. Other structures can be referred to the general design.
[0139] (2) Where there is no conflict, the embodiments of this disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.
[0140] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. The scope of protection of this disclosure should be determined by the scope of protection of the claims.
Claims
1. A verification method for a processor, comprising: Create a resource pool model corresponding to the resource pool of the processor; Monitor the status information changes of the credential queue module to be tested in the resource pool during the process of the processor processing multiple objects to execute tasks; In response to monitoring changes in the status information of the voucher queue module, the resource pool model is used to acquire and record monitoring status information based on changes in the status information of the voucher queue module; The resource pool is verified based on the monitoring status information of the resource pool model; The process of verifying the resource pool based on the monitoring status information of the resource pool model includes: determining whether the resource pool has experienced credential loss based on the monitoring status information. The monitoring of the status information changes of the credential queue module to be tested in the resource pool during the process of the processor processing the multiple objects to execute tasks includes: monitoring the number of buffered credentials in the buffered credential queue of the credential queue module and / or the number of resource credentials in the N resource credential queues of the credential queue module during the process of the processor processing the multiple objects to execute tasks, so as to realize the monitoring of the status information changes of the credential queue module. The monitoring status information is obtained through monitoring and is consistent with the real-time status of the voucher queue module.
2. The verification method as described in claim 1, wherein, In response to monitoring changes in the status information of the voucher queue module, the resource pool model is used to acquire and record monitoring status information based on changes in the status information of the voucher queue module, including: In response to a change in the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in the N resource credential queues, the monitor will send the real-time monitored number of buffered credentials in the buffered credential queue and / or the number of resource credentials in the N resource credential queues back to the resource pool model. In response to the monitor transmitting the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in the N resource credential queues back to the resource pool model, the resource pool model updates and records the monitoring status information in real time, so that the updated monitoring status information is consistent with the real-time status of the credential queue module.
3. The verification method as described in claim 2, wherein, The resource pool is an asynchronous resource pool. The processor includes a decoding unit, a scheduler, and an execution unit. The decoding unit is configured to obtain one or more unit execution codes by decoding instructions. The scheduler is configured to request credentials from the credential queue module based on the resources required by each object unit execution code and schedule the object unit execution codes. The execution unit executes the object unit execution codes based on the credentials corresponding to the object unit execution codes. The execution task includes the instructions. The verification method further includes: During the credential request phase of the asynchronous resource pool, in response to the scheduler scheduling the object unit execution code to the unit execution code buffer of the execution unit, the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in at least one corresponding resource credential queue among the N resource credential queues is reduced, and, During the credential release phase of the asynchronous resource pool, in response to the execution unit executing the object unit execution code and retiring the object unit execution code, the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in at least one of the N resource credential queues increases.
4. The verification method as described in claim 3, wherein, The monitor monitors the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in the N resource credential queues during the processor's processing of the multiple objects' execution tasks, including: In response to the credential request phase, the monitor monitors the buffer credential queue and the N resource credential queues, as well as the scheduler, to monitor the number of buffer credentials in the buffer credential queue and / or the number of resource credentials in the N resource credential queues during the process of the processor handling the execution tasks of the multiple objects. In response to the credential release phase, the monitor monitors the scheduler and / or the buffer credential queue and the N resource credential queues to monitor the number of buffer credentials in the buffer credential queue and / or the number of resource credentials in the N resource credential queues during the process of the processor handling the execution tasks of the multiple objects.
5. The verification method as described in claim 4, wherein, Determining whether the resource pool has experienced credential loss based on the monitoring status information includes: Based on the monitoring status information, obtain the current release number of N-type resource credentials at retirement for at least one of the multiple unit execution codes; Based on the current number of N-type resource credentials released at the retirement of at least one of the multiple unit execution codes, and the type and number of resource credentials corresponding to the physical resources occupied by the multiple unit execution codes during scheduling, it is determined whether the asynchronous resource pool has experienced credential loss, so as to obtain the credential loss verification result.
6. The verification method as described in claim 5, wherein, The monitoring status information includes at least one of the following: The following parameters are defined: the number of the N resource credential queues, the number of the buffer credential queues, the total capacity of the buffer credential queues, the total capacity of each of the N resource credential queues, the scheduling order of the multiple unit execution codes, the numbering information of the multiple unit execution codes, the number of used resource credentials and the number of remaining resource credentials in each of the N resource credential queues, the type of resource credential used by each of the multiple unit execution codes, the application time and release time of each resource credential used by each of the multiple unit execution codes, the type and number of resource credentials corresponding to the physical resources occupied by the unit execution code during scheduling according to its number, the number of used buffer credentials and the number of remaining buffer credentials in the buffer credential queues, and the application time and release time of each buffer credential used by each of the multiple unit execution codes.
7. The verification method as described in claim 6, wherein, Based on the current release count of at least one of the multiple unit execution codes at retirement of N types of resource credentials, and the type and number of resource credentials corresponding to the physical resources occupied by the multiple unit execution codes during scheduling, it is determined whether the asynchronous resource pool has experienced credential loss, in order to obtain credential loss verification results, including: In turn, according to the retirement order of the plurality of unit executable codes, when the current object unit executable code retires among the plurality of unit executable codes, the following is performed: Count the current release count of each type of resource credential in the N types of resource credentials to obtain the current release count of the N types of resource credentials corresponding to the object unit execution code; The current release count of each type of resource certificate in the N types of resource certificates is summed with the remaining release count of the corresponding type of resource certificate in the N types of resource certificates to obtain the total release count of each type of resource certificate in the N types of resource certificates corresponding to the object unit execution code. Subtract the number of resource certificates corresponding to the physical resources occupied by the object unit execution code during scheduling from the total number of released resource certificates of each of the N types of resource certificates to obtain N difference values. In response to all N differences being not less than zero, corresponding to the object unit execution code passing the retirement check, each of the N differences is used as the remaining release number of each type of resource credential in the N types of resource credentials corresponding to the next object unit execution code, wherein the remaining release number of each type of resource credential in the N types of resource credentials corresponding to the first object unit execution code is zero. In response to at least one of the N differences being less than zero, corresponding to the object unit execution code failing the retirement check, the current object unit execution code and the type of lost resource credential are reported to obtain the credential loss verification result.
8. The verification method as described in claim 7, further comprising: In response to a failure of the check corresponding to the current object unit executable code upon retirement, at least one target unit executable code that used the lost resource credential within a preset time period before the retirement of the current object unit executable code is retrieved according to the retirement order of the buffer credentials in the buffer credential queue, in order to obtain the credential loss verification result. The retirement order of the buffer credentials in the buffer credential queue is consistent with the scheduling order of the multiple unit execution codes.
9. A verification system for a processor, comprising: The monitor is configured to monitor the status information changes of the credential queue module to be tested in the processor's resource pool during the processor's processing of multiple objects to perform tasks; The resource pool model is configured to create a resource pool corresponding to the processor and to acquire and record monitoring status information based on the status information changes of the credential queue module in response to monitoring changes in the status information of the credential queue module, and to verify the resource pool based on the monitoring status information. The resource pool model is configured to determine whether the resource pool has lost credentials based on the monitoring status information, in order to verify the resource pool. The monitor is configured to monitor the number of buffered credentials in the buffered credential queue of the credential queue module and / or the number of resource credentials in the N resource credential queues of the credential queue module during the process of the processor processing the execution tasks of the multiple objects, so as to monitor the changes in the status information of the credential queue module. The monitoring status information is obtained through monitoring and is consistent with the real-time status of the voucher queue module.
10. The verification system as described in claim 9, wherein, The resource pool model is connected to the monitor, so that when the monitor detects a change in the number of buffered credentials in the buffered credential queue of the credential queue module and / or the number of resource credentials in the N resource credential queues of the credential queue module, it sends the real-time monitored number of buffered credentials in the buffered credential queue and / or the number of resource credentials in the N resource credential queues back to the resource pool model, so that the resource pool model updates and records the monitoring status information in real time, making the updated monitoring status information consistent with the real-time status of the credential queue module.
11. The verification system as described in claim 10, wherein, The resource pool is an asynchronous resource pool. The processor includes a decoding unit, a scheduler, and an execution unit. The decoding unit is configured to obtain one or more unit execution codes by decoding instructions. The scheduler is configured to request credentials from the credential queue module and schedule the object unit execution codes according to the resources required by each object unit execution code. The execution unit executes the object unit execution codes according to the credentials corresponding to the object unit execution codes. The execution task includes the instructions. The scheduler is connected to the unit execution code buffer of the execution unit to schedule the object unit execution code to the unit execution code buffer during the credential request phase of the asynchronous resource pool, thereby reducing the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in at least one of the N resource credential queues. The execution unit is configured to execute the object unit execution code and retire the object unit execution code during the credential release phase of the asynchronous resource pool, thereby increasing the number of buffered credentials in the buffered credential queue and / or the number of resource credentials in at least one of the N resource credential queues.
12. The verification system as described in claim 11, wherein, The monitor is connected to the buffer credential queue, the N resource credential queues, and the scheduler, respectively, so that in response to the credential request phase, the monitor monitors the buffer credential queue, the N resource credential queues, and the scheduler to monitor the number of buffered credentials in the buffer credential queue and / or the number of resource credentials in the N resource credential queues during the processor's processing of the multiple object execution tasks; and in response to the credential release phase, the monitor monitors the scheduler and / or the buffer credential queue and the N resource credential queues to monitor the number of buffered credentials in the buffer credential queue and / or the number of resource credentials in the N resource credential queues during the processor's processing of the multiple object execution tasks.
13. The verification system as described in claim 11, wherein, The resource pool model includes a first credential loss check module. The first credential loss check module is configured to obtain the current release number of N types of resource credentials of at least one of the plurality of unit execution codes at retirement based on the monitoring status information, and to determine whether the asynchronous resource pool has experienced credential loss based on the current release number of N types of resource credentials of at least one of the plurality of unit execution codes at retirement and the type and number of resource credentials corresponding to the physical resources occupied by the plurality of unit execution codes during scheduling, so as to obtain the credential loss verification result.
14. The verification system as described in claim 13, wherein, The monitoring status information includes at least one of the following: The following parameters are defined: the number of the N resource credential queues, the number of the buffer credential queues, the total capacity of the buffer credential queues, the total capacity of each of the N resource credential queues, the scheduling order of the multiple unit execution codes, the numbering information of the multiple unit execution codes, the number of used resource credentials and the number of remaining resource credentials in each of the N resource credential queues, the type of resource credential used by each of the multiple unit execution codes, the application time and release time of each resource credential used by each of the multiple unit execution codes, the type and number of resource credentials corresponding to the physical resources occupied by the unit execution code during scheduling according to its number, the number of used buffer credentials and the number of remaining buffer credentials in the buffer credential queues, and the application time and release time of each buffer credential used by each of the multiple unit execution codes.
15. The verification system as described in claim 14, wherein, The first credential loss check module includes: The counting unit is configured to: count the current release number of each type of resource certificate in the N types of resource certificates when the object unit execution code retires according to the retirement order of the plurality of unit execution codes and the current object unit execution code in the plurality of unit execution codes, and obtain the current release number of the N types of resource certificates corresponding to the object unit execution code; The summation unit is configured to: sum the current release number of each type of resource certificate in the N types of resource certificates with the remaining release number of the corresponding type of resource certificates in the N types of resource certificates to obtain the total release number of each type of resource certificate in the N types of resource certificates corresponding to the object unit execution code; and subtract the number of resource certificates corresponding to the physical resources occupied by the object unit execution code during scheduling from the total release number of each type of resource certificate in the N types of resource certificates to obtain N differences. The comparison unit is configured to compare the N differences with zero; The judgment unit is configured to: respond to the fact that all N differences are not less than zero, corresponding to the object unit execution code passing the retirement check, take each of the N differences as the remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the next object unit execution code, wherein the remaining release number of each type of resource certificate in the N types of resource certificates corresponding to the first object unit execution code is zero; and respond to the fact that at least one of the N differences is less than zero, corresponding to the object unit execution code failing the retirement check, report the current object unit execution code and the type of lost resource certificate, thereby obtaining the certificate loss verification result.
16. The verification system as described in claim 15, wherein, The resource pool model also includes a second credential loss check module. The second credential loss checking module is connected to the first credential loss checking module, and the second credential loss checking module is configured to: in response to the failure of the check corresponding to the current object unit execution code when it retires, obtain at least one target unit execution code that has used the lost resource credential within a preset time before the retirement of the current object unit execution code, according to the retirement order of the buffer credentials in the buffer credential queue, so as to obtain the credential loss verification result; wherein, the retirement order of the buffer credentials in the buffer credential queue is consistent with the scheduling order of the plurality of unit execution codes.
17. The verification system as described in any one of claims 11 to 16, further comprising: A first interface and N second interfaces, wherein... The monitor is connected to the buffer credential queue through the first interface, and the monitor is connected to the N resource credential queues through the N second interfaces respectively.
18. An electronic device comprising: Processing unit and storage unit The storage unit stores a computer program, which, when executed by the processing unit, implements the verification method according to any one of claims 1 to 8.
19. A computer-readable storage medium, wherein, The storage medium stores a computer program, which, when executed by the processing unit, implements the verification method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Electronic certificate generation method and device, computer device and storage medium
CN110532807A
System and method for managing resources in a distributed storage system
US20070028068A1