CONFIGURABLE STATE TRANSITION
20230091478 · 2023-03-23
Assignee
Inventors
Cpc classification
International classification
Abstract
According to one aspect of the present disclosure a system and method of enhancing random test case generation during pre-silicon design verification of test models of very large scale integration (VLSI) processors and systems is provided. A test sequence including a specification of at least one target state value for at least one resource of the hardware design model is received and includes a state object having at least one state element defining the target state value for a resource. Instructions are generated to transition the at least one resource from an existing state to the at least one target state value. The instructions are executed according to the test sequence to transition the resources to the defined state. State information on the hardware design model is output to allow a process engineer to determine whether the target state value for the resource was successfully changed.
Claims
1. A computer implemented method of determining the operability of an integrated circuit, comprising: receiving a test sequence including a specification of at least one target state value for at least one resource of a model of the integrated circuit, the specification including a state object including at least one state element defining the target state value for the resource; generating a plurality of instructions to transition the at least one resource from an existing state to the at least one target state value; executing the instructions according to the test sequence to transition the at least one resource in the model to the defined state; after executing the instructions, outputting state information on the hardware design model to determine whether the target state value for the resource was successfully changed; and redesigning the model based on whether the state information was successfully changed.
2. The computer implemented method of claim 1 wherein the test sequence is defined in source code script and further including instantiating the state object to call a method to perform the generating.
3. The computer implemented method of claim 2 wherein the test sequence includes a default processing order for the state elements comprising an order the state elements are defined in the source code script.
4. The computer implemented method of claim 2 wherein the script defines a test sequence which defines a processing order for the state elements by grouping similar state elements.
5. The computer implemented method of claim 2 wherein the source code defines instruction sequences for more than one execution thread.
6. The computer implemented method of claim 5 wherein the method further includes maintaining a mapping between each of a computer implemented execution thread and an execution thread executing the test model.
7. A processing device, comprising: a non-transitory memory storage comprising instructions; and one or more processors in communication with the memory storage, wherein the one or more processors execute the instructions to: receive a test sequence including a specification of at least one target state value for at least one resource of an integrated circuit design model, the specification including a state object including at least one state element defining the target state value for the resource; generate a plurality of state transition instructions to transition the at least one resource from an existing state to the at least one target state value; executing the state transition instructions according to the test sequence to transition the at least one resources to the defined state; and after executing the state transition instructions, output state information on the integrated circuit design model to determine whether the target state value for the resource was successfully changed to verify operation of the design.
8. The processing device of claim 7 wherein the test sequence is defined in source code script and further including instantiating the state object to call a processing device to perform the generating.
9. The processing device of claim 7 wherein the resources comprise at least one of: general purpose registers (GPRs), floating point registers (FPRs), system registers, and system memory, and each state element defines a value of the resource after the state transition.
10. The processing device of claim 7 wherein the test sequence defines a processing order for the state elements.
11. The processing device of claim 8 wherein the test sequence uses a default processing order for the state elements comprising an order the state elements are defined in the source code script.
12. The processing device of claim 8 wherein the script defines a test sequence which defines a processing order for the state elements by grouping similar state elements.
13. The processing device of claim 8 wherein the source code defines instruction sequences for more than one execution thread.
14. A non-transitory computer-readable medium storing computer instructions for one or more processors, that when executed by one or more processors, cause the one or more processors to: receive a test sequence including a specification of at least one target state value for at least one resource of an integrated circuit device design model, the specification including a state object including at least one state element defining the target state value for the resource; generate a plurality of state transition instructions to transition the at least one resource from an existing state to the at least one target state value; executing the state transition instructions according to the test sequence to transition the at least one resource to the defined state; and after executing the state transition instructions, output state information on the integrated circuit design model to determine whether the target state value for the resource was successfully changed.
15. The non-transitory computer-readable medium of claim 14 wherein the test sequence is defined in source code script and the instructions cause the one or more processors to instantiate the state object to call a method to perform the generating.
16. The non-transitory computer-readable medium of claim 14 wherein the test sequence defines a processing order for the state elements.
17. The non-transitory computer-readable medium of claim 15 wherein the test sequence uses a default processing order for the state elements comprising an order the state elements are defined in the source code script.
18. The non-transitory computer-readable medium of claim 15 wherein the source code script defines a test sequence which defines a processing order for the state elements by grouping similar state elements.
19. The non-transitory computer-readable medium of claim 15 wherein the source code script defines instruction sequences for more than one execution thread.
20. The non-transitory computer-readable medium of claim 19 wherein the instructions further cause the processor to maintain a mapping between each execution thread and a thread executing the test model.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Aspects of the present disclosure are illustrated by way of example and are not limited by the accompanying figures for which like references indicate the same or similar elements.
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
DETAILED DESCRIPTION
[0026] The present disclosure and embodiments address a novel method of enhancing random test case generation within the context of pre-silicon design verification of test models of very large scale integration (VLSI) processors and systems. The present disclosure describes technology which allows the specification of device states (including intermediate states) that a generated test case must achieve within a test model. Using the described technology, the design verification engineer can efficiently specify the target states for the test model to an instruction sequence generator (ISG), and the ISG will produce a test (execution) case having a sequence of instructions or commands to create the targeted state in the test model. This configurable state transition provides a novel way of enhancing random test case generation within the context of pre-silicon design verification of VLSI processors and systems. The test generation is random since the verification engineer need not write the sequence of instructions needed to achieve the intermediate or final state of the system's resources which are being tested. This configurable state transition makes it easier for the verification engineer to target specific verification scenarios in the test model by specifying the specific states that must be achieved while still using generated randomized test cases.
[0027] The technology described herein is applicable to any form of integrated circuit which includes, without limitation, processors, microprocessors, memories, SoCs or other hardware devices which are manufactured on substrates of a semiconductor material.
[0028]
[0029]
[0030] One example of a state transition is the change in the contents of a RISC-V general purpose register from one value to a different value. For example, an initial value may be 0x1234, with the new or target value being 0x1278. Another example of a state transition is the change in the value of the contents of a memory location. For a given memory address of, for example, 0x00FF00B0, the contents of that location might initially be 0x0000000 but undergo a state transition to change the contents to a different value such as 0xAA55AA55. The configurable state transition of the described technology provides a mechanism for a verification engineer to specify a state transition to the ISG from a top-level template (110) without the need to specify a specific instruction sequence to implement that state transition.
[0031] At 230, for each test case, the ISG generates instructions for the test model to transition the modeled hardware to the defined target state. As discussed herein, the ISG is a random instruction sequence generator which performs this task based on the template definition. In one embodiment, the ISG generates instruction sequences automatically based on the defined test state or states for each resource defined in the test. At 240, the instructions are executed by the test model and results monitored for each test. At 250, a determination is made as to whether additional tests are to be performed. If so, then the method returns to step 230 for the next test. If not, then once all tests are completed at 250, a determination is made at 260 as to whether the design passes the test. If not, the hardware model may be re-designed at 280. If so, additional testing may still be required for other components of the design or the hardware may be ready to proceed to build at 270.
[0032] Step 270 may include those steps necessary to complete the fabrication of the integrated circuit that is the subject of the hardware model. This includes front-end semiconductor fabrication steps comprising the physical creation, or fabrication, of the semiconductor as well as back-end assembly, testing, and packaging.
[0033]
[0034] Template 300 is, in one embodiment, a Python program which generally defines the test functions that are required to be verified and may vary in length depending on the specific test functions required. The template 300 controls how specific APIs to the ISG backend 320 are called and it is the calls to the methods in the API 315 that generate instructions based on pseudorandomized generation and parameters passed in the API calls.
[0035] In various implementations, the frontend 310 may be operable on a first processing device which communicates with the backend which is operable on a second processing device through the application programming interface 315. In another embodiment, both the frontend and the backend may be operable on one processing device such as that illustrated in
[0036] The frontend 310 uses the interpreter 305 to provide an interface to a series of functions (instructions operable on a processing device) callable by the template code via the API 315. Each template may use a sequence of API calls to build a test case. Various examples of such modules may include API calls to generate instructions, obtain random physical or virtual addresses, obtain or get free memory pages, get random registers or general purpose registers, initialize and reserve (or unreserve) memory, lock and unlock threads, etc. The nature of each of these APIs can be customized for the particular hardware model (test model) and instruction set under testing by the technology described herein.
[0037]
[0038] When no additional state elements are defined as part of the testing and verification process, a transition-to-state method is invoked at 450.
[0039] At 460, a state transition manager is selected based on each thread ID of the template sequence calling the transition-to-state method. The state transition manager is responsible for assigning state transition handlers to perform state transitions. Each state transition manager manages the steps of updating the resources in the test model. The templates can be coded to generate instruction sequences for more than one execution thread. As such, there is a state transition manager for each thread and a mapping between the processor threads executing the test model and in the transition manager itself. Consequently, the thread executing the transition-to-state method is mapped to the test model thread being executed by the processor running the test method.
[0040] At 470, the state transition manager looks up the transition order that is to be used. If no state transition order for the state elements is specified in the template, a default state transition order is used. Based on the transition order and the state transition handler(s) for that a given ID, at 480 for each state element, the state transition manager selects a state transition handler for that element and at 490, invokes each of the state transition handlers to perform all of the resource value updates required by the state elements in the state object.
[0041] After the state transition is complete, at 495 control is returned to the template code to continue with its processing of any additional code in the template.
[0042]
[0043] The state transition manager 530 is responsible for assigning state transition handlers 540 to perform state transitions. The state transition handlers 540 manage the steps of updating the resources in the test model. As noted above, the template can be coded to generate instruction sequences for more than one execution thread. In such cases, there is one state transition manager per thread. The state transition manager repository 520 maintains a map between the thread and the state transition managers 530 so that the proper state transition manager can be called when a state transition is requested. The repository includes methods to initialize, destroy, get and add state transition mangers.
[0044] The state transition manager 530 also maintains a mapping between the state element type (register, memory, etc. . . . ) and the state transition handlers so that, if desired, a different state transition handler can be used for each type of state element. A default state transition handler is provided for each type of state element. The verification engineer can provide a different state transition handler creating a subclass of the state transition handler and overriding the processStateElement( ) method.
[0045]
[0046]
[0047] If no “default” order is specified at 710, the method uses the “specified order” mode and state element type sequence at 730. At 738, again, the set of registered state transition handlers for the state transition type is retrieved. Next, at 740, a determination is made as to whether the “as specified” order mode is defined. If so, then the state elements are processed in the order in which they are added at 745. If not, a determination is made as to whether not the order mode is “by state element type” at 750. If so, then the state elements are grouped by type at 770, and the state element groups are sorted in the order of the state element type sequence at 775. If at 750 the order mode is not by state element type, then at 755 a determination is made as to whether or not the order mode is determined “by priority.” If so, then at 775, the state elements are sorted in ascending priority ordered. If not, then at 770, the method fails due to an unknown word order mode.
[0048]
[0049]
[0050]
[0051]
[0052] A state transition can have multiple state elements defining changes to different resources of the same type and of different types. When the state transition occurs, all of the resources will be updated. By default, the state elements will be processed by the state-transition-handler in the order in which they were added to the state object. The verification engineer may alternatively specify that the updates be grouped by state element type, in which case a default ordering for which type of state element is updated (first, second, etc. . . . ) Is used. The verification engineer may specify a custom ordering for the state elements if desired. When doing so, the verification engineer must keep in mind any side effects of instruction execution that might occur which could potentially overwrite previously performed updates within the state transition.
[0053] During the course of execution of the template, at the point desired by the verification engineer, a transition-to-state method is called which causes the generator to produce code that transitions the test model to the new state. After transitioning to the resulting State, the template might generate a series of random zero-offset load and store instructions that would all be guaranteed to target addresses in the given page. Each successful load instruction would insert an address within the given page range into the destination GPR.
[0054]
[0055] The CPU 1110 may comprise any type of electronic data processor. The memory 1120 may comprise any type of system memory such as static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous DRAM (SDRAM), read-only memory (ROM), a combination thereof, or the like. In an embodiment, the memory 1120 may include ROM for use at boot-up, and DRAM for program and data storage for use while executing programs.
[0056] In embodiments, the memory 1120 is non-transitory. In one embodiment, the memory 1120 includes a script interpreter 1120A, a state transition manager repository 11206, one or more state transition managers 1120C, one or more state transition handlers 1120D and one or more templates 1120E. Any one or more of these elements may be stored as instructions on the mass storage device 1130. The instructions may be operable to control the CPU 1110 to perform the functions described above with respect to these elements.
[0057] The mass storage device 1130 may comprise any type of storage device configured to store data, programs, and other information and to make the data, programs, and other information accessible via the bus 1170. The mass storage device 1130 may comprise, for example, one or more of a solid-state drive, hard disk drive, a magnetic disk drive, an optical disk drive, or the like.
[0058] The mass storage device may also store the any of the components described as being in or illustrated in memory 1120 to be read by the CPU and executed in memory 1120. The mass storage device may comprise computer-readable non-transitory media which includes all types of computer readable media, including magnetic storage media, optical storage media, and solid-state storage media and specifically excludes signals. It should be understood that the software can be installed in and sold with the network device. Alternatively the software can be obtained and loaded into network device, including obtaining the software via a disc medium or from any manner of network or distribution system, including, for example, from a server owned by the software creator or from a server not owned but used by the software creator. The software can be stored on a server for distribution over the Internet, for example.
[0059] The network device 1100 also includes one or more network interfaces 1150, which may comprise wired links, such as an Ethernet cable or the like, and/or wireless links to access nodes or one or more networks 1180. The network interface 1150 allows the network device 1100 to communicate with remote units via the networks 1180. For example, the network interface 1150 may provide wireless communication via one or more transmitters/transmit antennas and one or more receivers/receive antennas. In an embodiment, the network device 1100 is coupled to a local-area network or a wide-area network 1180 for data processing and communications with remote devices, such as other processing units, the Internet, remote storage facilities, or the like.
[0060] The configurable state transition of the described technology enhances the capability of the ISG by allowing the verification engineer to make a call to the transition-to-state method rather than write all of the code necessary to update a test model to a new state. The environment provided by the ISG to the template code is well suited for generating randomized instructions and code streams. This provides flexibility by allowing the verification engineer to write specific code to update resources and providing it to the state transition handler(s) if needed for certain scenarios.
[0061] This solves the testing problems described in the background by giving the verification engineer an efficient mechanism to generate randomized sequences of instructions that can update the test model resource state at intermediate points in the test case. This makes it easier to target testing of hard to achieve states within the test model. Because this can be done using the ISG, the instruction sequence generation can continue under control of the ISG. This is an additional ability to control or steer the test cases that are produced by the ISG, and it gives the random test case generation a better ability to address hard to achieve states while still enjoying the benefit of being generated. In one embodiment, the random test cases can be automatically generated, easing the burden on the verification engineer.
[0062] Further advantages of the configurable state transition technology include allowing a user to specify the intended state of the resources in the test model by providing a mechanism such as a state object that holds the new target state values for the resources defined in the state elements added to the state object. This allows the user to invoke the state transition at any point in the test sequence including locations other than the initial conditions and including multiple times within the test sequence. The mechanism to do this is making a method call to the transition-to state method that is given a pointer to the State object containing all of the state updates required for the state transition. The technology also provides default sequences of code with state transition handlers that perform the actual state transition while allowing a user the ability to substitute their own code for the state transition handler to use in the state transition.
[0063] For purposes of this document, it should be noted that the dimensions of the various features depicted in the figures may not necessarily be drawn to scale.
[0064] For purposes of this document, reference in the specification to “an embodiment,” “one embodiment,” “some embodiments,” or “another embodiment” may be used to describe different embodiments or the same embodiment.
[0065] For purposes of this document, a connection may be a direct connection or an indirect connection (e.g., via one or more other parts). In some cases, when an element is referred to as being connected or coupled to another element, the element may be directly connected to the other element or indirectly connected to the other element via intervening elements. When an element is referred to as being directly connected to another element, then there are no intervening elements between the element and the other element. Two devices are “in communication” if they are directly or indirectly connected so that they can communicate electronic signals between them.
[0066] Although the present disclosure has been described with reference to specific features and embodiments thereof, it is evident that various modifications and combinations can be made thereto without departing from scope of the disclosure. The specification and drawings are, accordingly, to be regarded simply as an illustration of the disclosure as defined by the appended claims, and are contemplated to cover any and all modifications, variations, combinations or equivalents that fall within the scope of the present disclosure.
[0067] The foregoing detailed description has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the subject matter claimed herein to the precise form(s) disclosed. Many modifications and variations are possible in light of the above teachings. The described embodiments were chosen in order to best explain the principles of the disclosed technology and its practical application to thereby enable others skilled in the art to best utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope be defined by the claims appended hereto.