The present invention generally relates to the field of validation software, and particularly to a software method for exhaustive variation of parameters that are independent of type.
There are many parameters that need to be varied to fully test hardware under test. Validation software that tests the functionality of the hardware may use parameters such as Peripheral Component Interconnect (PCI) cache line size, Small Computer System Interface (SCSI) synchronous rate, and block size. Over time, the hardware to be tested has grown in complexity. With the increased complexity, the different combinations of parameters become more unmanageable and extremely time consuming to implement in code. Current solutions are limited in that each parameter is treated separately and is varied within its predetermined bounds. The code used to implement each individual parameter is further limiting in that it is unique for each parameter. The unique code includes sections or subroutines for editing the parameter, storing the parameter into a configuration save file, displaying the parameter to the user, and varying the parameter during a test execution.
Therefore, it would be desirable to provide a method, computer readable medium, and system to permit complex hardware testing for current and future devices in a more manageable time efficient way.
Accordingly, the present invention is directed to a method, computer readable medium, and system for generating a state machine that is able to easily add, change, and delete states and vary the parameters of operating, testing, and/or simulating a hardware device.
In order to allow the developer to transparently implement new parameters, a level of abstraction is applied to the parameters. Once this level of abstraction is applied to the parameters, then common code may be assigned for each function, such as display, edit, store, load, and varying the parameters. In the present invention, adding new parameters into a validation or other software application is greatly simplified. New parameters may be added quickly and without knowledge of details on displaying, editing, storing, loading, and varying. With the present invention, varying a parameter is facilitated and the parameter state machine needs to be tested only once. Coding efforts are reduced to a bare minimum when adding new parameters. Errors induced by adding new parameters are minimized due to the common code handling of these parameters. The present invention also removes the dependence of existing parameters on the newly added parameters.
It is to be understood that both the forgoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed. The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate an embodiment of the invention and together with the general description, serve to explain the principles of the invention.
The numerous advantages of the present invention may be better understood by those skilled in the art by reference to the accompanying figures in which:
Reference will now be made in detail to the presently preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings.
The present invention relates to a method, system, and computer readable medium for generating a state machine and operating, testing, and simulating a device under test using common code that is function specific. The present invention is especially directed to system level validation of new silicon, such as found in new Small Computer System Interface (SCSI) controllers and new Fibre Channel (FC) controllers. The present invention allows exhaustive testing of the silicon in a number of host bus configurations, such as Peripheral Component Interconnect (PCI) and PCI Extended (PCIX), with a number of parameters, such as 32 bit or 64 bit operation or speeds of 33 MHz or 66 MHz. Every combination of SCSI protocol conditions may be tested, including SCSI bus speeds, widths, and offsets with various data patterns. SCSI parameters (e.g., synchronous bus reads, synchronous bus widths, synchronous offsets, data patterns) may be intermixed with PCI specific bus parameters (e.g., timers). The state machine is built through inputting parameter information into the common code and is independent of bus type—such as SCSI, FC, and PCI. The state machine can step through all possible combinations of parameters to test the way the silicon behaves. The parameters may have a default set of values and are subject to boundary conditions. With the present invention, a new parameter (SCSI, FC, iSCSI, PCI) may be added with minimal development effort. An algorithm advances the state machine from a current state to a next state. The present invention preferably uses pointers and status functions to build and maintain the state machine. Each function may have its own state machine or a single state machine may include multiple functions. In the embodiment where each function has its own state machine, other code may be used to interrelate two or more such state machines. Each parameter may be independent of type.
In the present invention, the parameter that can contain a set number of values that the user has set up. For example, if the user would like to setup a test with a Sync Rate of 40, 80, 160 and a Sync Offset of 1-9,15,31-47. The state machine would progress through a series of these combinations, such as
Various types of coding may be used set up a state machine in the present invention. A set of token definitions facilitates inter software module communications and facilitates management of the states. Each state may include one or more parameters. Various functions allow flexibility to the number, type, and value of parameters in a state machine. These functions allow the tracking of dead states, removed states, copy states, revived states, free states, and active states. Initialization and parameter validation are performed. There may be functions that permit changing the type of parameter, copying a parameter, changing a range of a parameter, changing an incremental step size of a parameter, and individually listing each value in a range of values for a parameter to permit a greater variety of parameter behavior. A random number generator may be used. The state changes may be logged in a log file. A tagging function may be used to verify the validity of addresses. A parsing function preferably is used to identify parameters in a string.
It is believed that the present invention and many of its attendant advantages will be understood by the forgoing description. It is also believed that it will be apparent that various changes may be made in the form, construction and arrangement of the components thereof without departing from the scope and spirit of the invention or without sacrificing all of its material advantages, the form hereinbefore described being merely an explanatory embodiment thereof. It is the intention of the following claims to encompass and include such changes.