A method for specifying a set of instructions selectable for generation by an instruction generator is disclosed. A class name representative of a class of instructions is identified and concatenated with a unique identifier label, thereby defining a unique singleton meta-mnemonic representative of a set of instructions. The class of instructions and the set of instructions are subsets of the instruction set of the processor. The resulting singleton meta-mnemonic specifies the set of instructions available for selection and generation by the instruction generator.
|
14. A method for specifying a set of instructions for selection by an instruction generator, comprising:
referencing the existing state of a processor and determining the architecture mode of said processor;
referencing the architecture table of said processor and determining whether said architecture mode is a valid architecture mode for an instruction as determining by reference to said architecture mode in said architecture table for said instruction;
assigning a valid architecture class name to said instruction in response to said architecture mode of said processor being a valid architecture mode specified for said instruction in said architecture table; wherein
said valid architecture class name specifies a valid set of instructions that are a subset of said processor instruction set and are available for selection and generation by said instruction generator; and
assigning a disabling class name to a second instruction so as to remove said second instruction from every class associated with said second instruction.
10. A processor programmed for specifying a set of instructions selectable for generation by an instruction generator, the processor being programmed for:
identifying a first class name representative of a first class of instructions, said first class of instructions being a subset of an instruction set of said processor;
concatenating said first class name with a unique identifier label thereby defining a unique singleton meta-nmemonic representative of a first set of instructions, said first set of instructions being a subset of said instruction set of said processor;
identifying at least a second class name representative of at least a second class of instructions, said at least a second class of instructions being a subset of said instruction set;
concatenating said first class name with said at least a second class name and a unique identifier label thereby defining a unique compound meta-mnemonic representative of at least a second set of instructions, each instruction in said at least a second set of instructions having membership in each of said classes;
concatenating at least one of said singleton meta-mnemonic and said compound meta-mnemonic with an exclusionary label thereby defining an exclusionary meta-mnemonic representative of a third set of instructions, each instruction in said third set of instructions having membership outside of the set of instructions defined by at least one of said singleton meta-mnemonic and said compound meta-mnemonic;
specifying, via said singleton meta-mnemonic, said first set of instructions for selection by said instruction generator;
specifying, via said compound meta-mnemonic, said at least a second set of instructions for selection by said instruction generator; and
specifying, via said exclusionary meta-mnemonic, said third set of instructions for selection by said instruction generator;
conditionally selecting between two sets of instructions defined by at least one of said meta-mnemonics based at least partially on the existing state of said processor, thereby resulting in a conditional user-defined set of instructions for selection by said instruction generator;
resolving said conditional user-defined set of instructions at runtime; and
explicitly selecting between two sets of instructions defined by at least one of said meta-mnemonics based at least partially on a user defined control statement, thereby resulting in an explicit user-defined set of instructions for selection by said instruction generator.
1. A method for specifying a set of instructions selectable for generation by an instruction generator, comprising:
identifying a first class name representative of a first class of instructions, said first class of instructions being a subset of an instruction set of a processor;
concatenating said first class name with a unique identifier label thereby defining a unique singleton meta-mnemonic representative of a first set of instructions, said first set of instructions being a subset of said instruction set of said processor;
specifying, via said singleton meta-mnemonic, said first set of instructions for selection by said instruction generator; wherein
said singleton meta-mnemonic specifies a set of instructions that are a subset of said processor instruction set and are available for selection and generation by said instruction generator;
identifying at least a second class name representative of at least a second class of instructions, said at least a second class of instructions being a subset of said instruction set;
concatenating said first class name with said at least a second class name and a unique identifier label thereby defining a unique compound meta-nmemonic representative of at least a second set of instructions, each instruction in said at least a second set of instructions having membership in each of said classes;
specifying, via said compound meta-nmemonic, said at least a second set of instructions for selection by said instruction generator; wherein
said compound meta-mnemonic specifies a set of instructions that are a subset of said processor instruction set and are available for selection and generation by said instruction generator;
concatenating at least one of said singleton meta-mnemonic and said compound meta-nmemonic with an exclusionary label thereby defining an exclusionary meta-nmemonic representative of a third set of instructions, each instruction in said third set of instructions having membership outside of the set of instructions defined by at least one of said singleton meta-mnemonic and said compound meta-nmemonic;
specifying, via said exclusionary meta-nmemonic, said third set of instructions for selection by said instruction generator; wherein
said exclusionary meta-nmemonic specifies a set of instructions that are a subset of said processor instruction set and are available for selection and generation by said instruction generator;
converting at least one of said singleton, said compound, and said exclusionary meta-mnemonic into an expression containing the value of said converted meta-mnemonic;
parsing the expression and creating a binary expression tree containing the values for at least one of an operator, an operand, said converted meta-mnemonic, a conditional ternary operator, and a definition of the resulting set of instructions;
referencing the existing state of said processor; and
determining which set of instructions to utilize based on the existing state of said processor.
2. The method of
3. The method of
selecting between two sets of instructions defined by said singleton meta-mnemonic, said compound meta-mnemonic, and said exclusionary meta-mnemonic, thereby resulting in a user-defined set of instructions for selection by said instruction generator.
4. The method of
conditionally selecting based on the existing state of said processor, thereby resulting in a conditional user-defined set of instructions for selection by said instruction generator.
5. The method of
resolving said conditional user-defined set of instructions at runtime.
6. The method of
explicitly selecting based on a user defined control statement, thereby resulting in an explicit user-defined set of instructions for selection by said instruction generator.
7. The method of
selecting a subset of instructions from a set of instructions based at least partially on whether an instruction specifies a first condition or specifies a second condition; and
restricting said subset of instructions to include a first type of instruction if said instruction specifies said first condition, and to include a second type of instruction if said instruction specifies said second condition.
8. The method of
said set of instructions are control flow instructions;
said first condition comprises no target node;
said second condition comprises a target node;
said first type of instruction comprises sequential type instructions; and
said second type of instruction comprises non-sequential type instructions.
9. The method of
selecting a subset of instructions from a set of instructions based at least partially on a set expression having at least one of a class expression, a conditional expression, a binary operator, a unary operator, said singleton meta-mnemonic, said compound meta-mnemonic, said exclusionary meta-mnemonic, and a mnemonic.
11. The processor of
converting at least one of said singleton, said compound, and said exclusionary meta-mnemonic into an expression containing the value of said converted meta-mnemonic;
parsing the expression and creating a binary expression tree containing the values for at least one of an operator, an operand, said converted meta-mnemonic, a conditional ternary operator, and a definition of the resulting set of instructions;
referencing the existing state of said processor; and
determining which set of instructions to utilize based at least partially on the existing state of said processor.
12. The processor of
selecting a subset of instructions from a set of control flow instructions based at least partially on whether an instruction specifies no target node or specifies a target node; and
restricting said subset of instructions to include sequential type instructions if said instruction specifies no target node, and to include non-sequential type instructions if said instruction specifies a target node.
13. The processor of
selecting a subset of instructions from a set of instructions based at least partially on a set expression having at least one of a class expression, a conditional expression, a binary operator, a unary operator, said singleton meta-mnemonic, said compound meta-mnemonic, said exclusionary meta-mnemonic, and a mnemonic.
15. The method of
assigning an aborting class name to a third instruction; and
aborting a testcase in response to said processor encountering said third instruction.
|
The present disclosure relates generally to a method and apparatus for specifying a set of instructions for selection by an instruction generator, and particularly to a method and apparatus for dynamically and conditionally specifying a set of instructions that are available for selection by an instruction stream testcase generator when choosing the next instruction to generate.
Testing of a superscalar microprocessor architecture requires the generation of a large number of instruction sequences to assure that the microprocessor behaves properly under a wide variety of circumstances. Verification techniques generally require automated testing systems that can turn out high volume testcases in an effort to sufficiently cover the realm of possible behaviors of the integrated circuit being tested. Testcases may be generated by a testcase generator in accordance with parameters specified in a file that are provided by a software design specialist or engineer, otherwise the generator generates random testcases.
Generation of instruction sequences can be pseudo-randomly selected or guided based on templates in input files that are specified by the engineer that detail the instructions to generate. Each instruction selection within a template can be an explicit instruction mnemonic, such as,
Control statements and macros are used to generalize the template so that various instruction combinations can be tested with only one template. Macros may be declared external to the template and imported into more than one template.
New instructions that are added to the architecture of a processor require testing, which typically involves updating macros or instruction templates previously defined, thereby enabling them to be included in the new instruction set. New macros also need to be manually created to handle new groupings of instructions, whether based on architecture attributes or user selected groupings, which typically involves listing each instruction that is a part of the newly created grouping. Occasionally, instructions need to be avoided in the testcase generation, whether due to a segmented design or an instruction that is not yet fully implemented. Additionally, each explicit mnemonic reference, control statement, or macro that uses the new instruction typically needs to be temporarily updated to remove the new instruction and then updated again when the instruction is available for testing.
Macros with large lists of instructions are storage and computationally intensive as they are expanded to create structures for each control statement and each mnemonic listed. Typically these macros are reused multiple times in an instruction stream template. When selecting instructions based on a specific state of the machine, a macro needs to be created for each instruction in this grouping and must be utilized with the corresponding initialization file to insure the existence of the specific state.
Instruction sequence generators typically have attributes associated with each instruction in the architecture. Operand characteristics can also be specified for each operand of the instruction. These are usually kept with the instruction in some table format, such as:
The architecture table is parsed and kept as an internal table to the generator. Use of the table facilitates testcase generation by having these instruction attributes and instruction operand characteristics readily available in a table lookup. Some of these instruction features include classifications of the instruction, that is, which class the instruction belongs to. The class identifier is a generic description for the type of instruction (such as Binary floating point), or what architecture facility it is a part of (such as Long Displacement Facility), or what format the instruction is (such RR, RRF, for example), or which architecture the instruction is valid in (such as zArch). Other instruction attributes and instruction operand attributes can be contained in the architecture table and can include instruction action (such as CC_Setter), or operand type (such as Fetch or Store).
Mnemonic specification for template guided instruction stream generation typically includes the use of explicit assembler mnemonics, control statements with a list of mnemonics, and group identifiers/macro expansion of mnemonics. Control statements guide the generation and selection of a given list of mnemonics. These control statements typically include the following types:
As noted above, superscalar processors utilize large instruction sets that need to be tested by the production and execution of a large number of instruction sequences. To accomplish this, instruction stream testcase generators need to turn out high volume testcases in order to sufficiently cover the realm of possible behaviors of the integrated circuit being tested. Accordingly, it would be advantageous to have a testcase generator that could effectively and efficiently generate the necessary instruction stream testcases.
In one embodiment, a method for specifying a set of instructions selectable for generation by an instruction generator is disclosed. A class name representative of a class of instructions is identified and concatenated with a unique identifier label, thereby defining a unique singleton meta-mnemonic representative of a set of instructions. The class of instructions and the set of instructions are subsets of the instruction set of the processor. The resulting singleton meta-mnemonic specifies the set of instructions for execution by the processor.
In another embodiment, a processor programmed for specifying a set of instructions selectable for generation by an instruction generator is disclosed. The processor is programmed to identify a first class name representative of a first class of instructions and to concatenate the first class name with a unique identifier label, thereby defining a unique singleton meta-mnemonic representative of a set of instructions. The processor can also identify a second class name representative of a second class of instructions and concatenate the first class name with the second class name and a unique identifier label, thereby defining a unique compound meta-mnemonic representative of a second set of instructions, each instruction in the second set of instructions having membership in each of the classes. The processor can also concatenate a singleton meta-mnemonic or a compound meta-mnemonic with an exclusionary label, thereby defining an exclusionary meta-mnemonic representative of a third set of instructions, each instruction in the third set of instructions having membership outside of the set of instructions defined by the singleton meta-mnemonic and compound meta-mnemonic. The classes and sets of instructions are all subsets of the instruction set of the processor. The processor is programmed to use singleton, compound, and exclusionary meta-mnemonics for specifying an instruction set for selection by the instruction generator.
In a further embodiment, a method for specifying a set of instructions for selection by an instruction generator is disclosed. The existing state of a processor is referenced and the architecture mode of the processor is determined. The architecture table of the processor is referenced and it is determined whether the architecture mode is a valid architecture mode for an instruction, as determined by reference to the architecture mode in the architecture table for the instruction. A valid architecture class name is assigned to the instruction in response to the architecture mode of the processor being a valid architecture mode specified for the instruction in the architecture table. The resulting valid architecture class name specifies a valid set of instructions that are a subset of the processor instruction set and are available for selection and generation by the instruction generator.
Referring to the exemplary drawings wherein like elements are numbered alike in the accompanying Figures:
An embodiment of the invention provides a method of dynamically and conditionally specifying a set of instructions selectable for generation by an instruction stream testcase generator (ISTG). The ISTG consists of compiled code that runs on a processor, which generates an instruction for each instance of an instruction to be generated by selecting an instruction from the specified set. Sets of instructions are subsets of the processor's instruction set.
An instruction set differs from a set of instructions in that the instruction set is the set of instructions available to and particular to the processor, while the set of instructions is a subset of the instruction set available for selection by the testcase generator at a particular point in the generation of the test instruction stream. The instruction set of the processor is defined by the architecture table of the ISTG.
A class of instructions is a grouping of instructions that have similar attributes, such as: general; control; floating point; hex floating point; binary floating point (BFP); input/output (I/O); architecture (zArch for example); and, format (RR for example). Classes may also be instruction attributes, such as: “CC setting”; “PSW referencing”; “store type”; and “privileged type”, for example. They may also be the name of the architecture facility the instruction belongs to, such as: “Long Displacement”; and “Unicode”, for example.
The predefined instruction classes available that are typically utilized include:
The format of the instruction set is typically architecture dependent. For example, in the z-architecture (zArch), an instruction is either one, two, or three halfwords in length and is located in storage on a halfword boundary. Each instruction is in one of 17 basic formats: E, RR, RRE, RRF, R, RXE, RXF, RS, RSE, RSI, RI, RIE, RIL, SI, S, SSE, and SS, with three variations of RRF, two variations of RS and RSE, and four variations of SS.
For example, an RR (register-register) instruction format is:
##STR00001##
An RRE instruction format is:
##STR00002##
An RX instruction format is:
##STR00003##
The following are examples of singleton meta-mnemonics, which are one class references: BFP_Op, which results in a set of instructions including binary floating point instructions; RR_Op, which results in a set of instructions including register-register formatted instructions; and, LWC_Op, which results in a set of instructions including membership in the LongWindedClass user defined class of instructions. The following are examples of compound meta-mnemonics, which are intersection or multi-class references: BFP_RR_Op and MyGroup_RRF_Op, which result in sets of instructions where each element is a member of each component class. The following are examples of exclusionary meta-mnemonics, which are prefixed singleton or compound meta-mnemonics that include all members not in the set described: Non_RR_Op, which results in a set of instructions that excludes those instructions having an RR format; Non_BFP_RR_Op, which results in a set of instructions that excludes those instructions that are binary floating point and RR format.
Thus, to specify a selection from the set of all instructions with an RR format, the meta-mnemonic RR_Op would be used. Similarly, to specify a selection from the set of all binary floating point instructions, the meta-mnemonic BFP_Op would be used. Contrasting the meta-mnemonics with a macro replacement scheme, to specify these sets of instructions with a macro replacement would entail defining the macro (e.g. Any_BFP_Op( )) and listing each instruction that is a member of that group. To create a group with only the binary floating point instructions that have RR formats, one would have to create a new macro (e.g. Any_BFP_RR_Op( )) and list only those instructions that are members of each group. In accordance with an embodiment of the invention, as disclosed herein, a set of instructions having only binary floating point instructions and RR formats would be represented by the compound meta-mnemonic BFP_RR_Op.
Specifying the set of all instructions that are not in the group having binary floating point instructions and RR format is formed by adding the exclusion prefix (Non_) to the compound meta-mnemonic, for example, Non_BFP_RR_Op. To use a macro or control statement with mnemonic lists to generate this grouping would entail listing the hundreds of instructions in this group.
Meta-mnemonics are very flexible and facilitate the writing of instruction templates. They also greatly reduce the amount of data and computations required when using the macro-replacement form. For example, without meta-mnemonics as herein disclosed, the creation of the group of instructions that are Hex Floating Point and RR Format would entail writing a macro that has 73 instructions, as represented by:
Macro AnyHexFloatRROp( ) {
Oneof(ADR;AER;AUR;AWR;AXR; ....)
Ocram.
Using the compound meta-mnemonic HFP_RR_Op, the same set of instructions would be selected with one command. When using the exemplary macro above with a “Sequence” control statement, such as:
An embodiment of the invention adds predefined dynamically-resolved classes and several predefined special case classes. These are not specified as part the architecture table associated with the processor. A dynamically-resolved class is based on the existing state of the processor, thus an instruction's membership to a dynamically-resolved class is conditional on the value of the mode or state in the processor. For example, in certain architectures some instructions are only valid in a specific architecture mode, such as z/Architecture or s/390. Some instructions are valid in both architectures. The architecture table for the processor specifies which instructions are valid for which architecture (the default is typically both if none is specified). In accordance with an embodiment of the invention, a predefined dynamically-resolved class of “ValidArch” is provided, which applies to an instruction only when the architecture mode of the processor is one of the valid architecture modes specified for the instruction in the architecture table for the processor. Also provided in an embodiment of the invention is a predefined special case class “Any”, which every instruction is a member of. Other predefined special case classes provided in accordance with an embodiment of the invention are “Abort” and “Disable”, which can only be used in the user-defined classes and are described in more detail below.
In an embodiment of the invention, users can define arbitrary classifications (user-defined classes) for instructions. These classes are similar to groupings in the macro-replacement scheme, discussed above, or where control statements are used with lists of mnemonics, but the meta-mnemonic method, as herein disclosed, has several advantages. A meta-mnemonic can be used to augment the membership of classes that an instruction belongs to, as defined by the ISTG's architecture table, by placing the user-defined classes in a user input file. A class name is first defined, and optionally abbreviated, then associated with one or more instructions. Alternatively, multiple classes may be associated with a single instruction. For example:
An embodiment of the invention creates a predefined class name called “Disable”, which is only available in the user-defined class input file, and when associated with an instruction, removes this instruction from every class (see CLASS(Disable) discussed above). The use of “Disable” provides a quick and easy method of temporarily removing an instruction from a class, thereby preventing the instruction from being selected. In contrast, the macro-replacement or control statement methods require that all files with this instruction be updated. Another predefined class available with an embodiment of the invention is “Abort”, which when associated with an instruction, aborts the testcase generated when the associated instruction is encountered. The difference between “Disable” and “Abort” is that “Disable” prevents generation of an associated instruction, while “Abort” prevents the creation of a testcase with the associated instruction. The “Abort” sequence may occur due to self-modifying code not related to an instruction template, or due to a testcase generation guided by an instruction template.
An embodiment of the invention enables a user-defined class definition to have a conditional expression, based on the state, or mode, of the processor, to determine when the class is valid. A conditional expression permits the definition of user-defined dynamically-resolved classes to be based on the current state (or existing state) of the processor. The user-defined classes can reference register bits/values and modes of the processor. For example:
<CondDefinition> ::= DEFINECOND ( <NewCondName> ) EXPR({<Expression>});
<NewClassDefinition> ::= DEFINECLASS (<NewClassName> ) [<NewClassAbbrev>]
[<Condition>];
<Condition> ::= WHEN( <CondName> )
::= WHEN({<Expression>);
<NewCondName> ::= alphanumeric string, 32 max, unique;
<CondName> ::= any user-defined Condition name;
<Expression> ::= <Expression> <condOp> <Expression>
::={<Expression>}
::= <MachineStateSymbolic>
::= <value>;
<MachineStateSymbolic> ::= any symbol representing a bit or bits in a processor register
or state/mode (e.g. zArch, PSW.ProblemState, CR9.ModeTrace, etc.);
<value> ::= hex or decimal number representable in 64 bits;
<NewClassName> ::= alphanumeric string, 32 max, unique;
<NewClassAbbrev> ::= ABBREV( <NewClassAbbrevName> );
<NewClassAbbrevName> ::= alphanumeric string, 8 max, unique;
<Class> ::= <class_list>;
<class_list> ::= <class>
::= <class>, <class_list>;
<class> ::= any predefined class or user-defined class.
The user input file for class definitions is parsed, and each new defined condition/class/abbreviation (element) is checked for uniqueness with other elements of the same type. In an embodiment, structures are created for holding the class name and optional abbreviation (default is null if not supplied) and optional associated expression (default is null if not specified). Each new class receives an assigned bit to represent it in the user class data area, with each bit being sequentially assigned from left to right. Other bit assignments may be possible without detracting from the teachings of the disclosed invention. To accommodate the new classes, the internal representation of the processor's architecture table is expanded to include a new field for each instruction's user-defined classes. The new field contains a bit map of user classes associated with the instruction, and is referenced when the ISTG evaluates the meta-mnemonics. During runtime, if there is an expression associated with the user-defined class, the expression is parsed and kept as a binary expression tree. The ISTG evaluates the expression when referencing membership in the subject class. The predefined classes can be represented by having bits of a structure represent each class, or by encoding several bits to represent a class (e.g. format). When the architecture table is parsed, it creates the structure for the classes that the instruction belongs to, and sets those bits to On. For example:
When generating an instruction requiring determination of membership in a class, the user-defined class fields quickly and simultaneously determine membership in any class or multiple classes. Each class is represented by a unique bit value or by a unique encoding of bits. A compound meta-mnemonic would be represented by the logical OR-ing of the unique class bits of its component classes. To determine membership of an instruction in a class, one would logically AND the unique bits of the class wanted, represented by the meta-mnemonic, with the instruction's unique class information, and if it equaled the wanted class then the instruction would be a member of that class.
The predefined dynamically-resolved classes utilize the current state of the processor to determine if an instruction is a member. For the user-defined dynamically-resolved classes, the binary expression tree for the condition is evaluated to determine class inclusion. This evaluation consists of evaluating each part of the expression tree. Machine state variables (register, register components, modes, etc., including dynamic architecture values depending on mode (e.g. Length of page table entry)) and/or literals, get evaluated to values and then the conditions evaluated.
As discussed above, the created meta-mnemonic is formed by concatenating the class name with (_Op) for ease of identification and uniqueness of name with the current mnemonics. Meta-mnemonics are resolved at runtime and take up the same amount of instruction node space as one explicit mnemonic. While typical macros expand to have one structure for each instruction in the expansion, meta-mnemonics as herein disclosed would only take one structure, like an explicit instruction, which are then replaced with any instance of the specified set.
Utilizing the predefined dynamically-resolved class “ValidArch”, discussed above, one can, in the current architecture mode irregardless of which mode it is, readily specify the group of instructions eligible for selection to be valid by using the meta-mnemonic ValidArch_Op, or to be invalid by using the meta-mnemonic Non_ValidArch_Op. Utilizing the user-defined dynamically-resolved class “MillicodedTrace”, one can readily specify the avoidance of any instruction that is dynamically determined to currently be executed in millicode by using the meta-mnemonic Non_MillicodedTrace_Op. This flexibility removes the need to maintain separate macros or explicit mnemonic templates and their accompanying initialization files that insure those relationships. Utilizing the predefined special class “Any_Op”, one can readily specify the selection of any instruction defined.
In an embodiment, there exists three control flow type instructions. The first is Sequential, where flow continues to the next adjacent instruction. The next two, Jump and Branch, are both non-sequential. In a Jump instruction, flow goes to the specified target instruction. In a Branch instruction, flow is based on a conditional check and either jumps to a target instruction or continues with the next sequential instruction. Jump and Branch type instructions must be specified with a target node, whereas sequential instructions must have no target node. An embodiment of the invention factors this template information, regarding target node and no target node, into the meta-mnemonic expression resolution. Accordingly, if the instruction location has no target node, thereby denoting a sequential instruction, then only sequential type instructions are permitted to be selected and any Jump/Branch types of instructions are skipped. Conversely, if the instruction location has a target node specified, thereby denoting a non-sequential instruction, then no sequential instructions are eligible for selection and they are skipped. This implicit handling of control flow and restricting the instructions selected facilitates selecting the correct kind of instruction for every instruction location, and assists the template writer by not requiring the explicit handling of control flow at every instruction.
A further embodiment of the invention provides for utilization of complex set expressions with set operators. These set expressions can reside in the same location a mnemonic or meta-mnemonic can reside. The set operators include the following:
<ClassExpr> ::= <ClassExpr> <BinaryOp> <ClassExpr>
<CondExpr> ? <ClassExpr> : <ClassExpr>
{<ClassExpr>}
{<UnaryOp> <ClassExpr>}
<MetaMnemonic>
<Mnemonic>
<BinaryOp> ::= |, &, or {circumflex over ( )}
<UnaryOp> ::= !
<MetaMnemonic> ::= <Singleton>
<Compound>
<Negated>
<Singleton> ::= <ClassID>_Op
<ClassID> ::= Any embedded/predefined class or class abbreviation
(including format)
Any user-defined class or class abbreviation
<Compound> ::= <ClassID>_<Singleton>
<ClassID>_<Compound>
<Negated> ::= Non_<Singleton>
Non_<Compound>
<CondExpr> ::= <expression> <condOp> <expression>
<Mnemonic> ::= any valid mnemonic
In the prior example, the compound meta-mnemonic BFP_RR_Op can also be equivalently achieved by using the set expression notation; {{BFP_Op} & {RR_Op}}.
In a further embodiment, one can conditionally select between two sets of descriptions of instructions based on the current state/mode of the processor. The syntax takes the form of the class syntax conditional expression using the ternary operator “?”, noted above. In the expression <condexpr>?<setexpr1>:<setexpr2>, <condexpr> is evaluated as a conditional expression. If the result of the conditional expression is true, then <setexpr1> is used, else <setexpr2> is used. Thus, in the following example,
During runtime, the instruction template guiding the instruction sequence generation is parsed and maintained as a linked-list of nodes, where each node contains information about the instruction to be generated. If the instruction is an explicit mnemonic, then that mnemonic is placed in the node. If the instruction is a control statement with a list of mnemonics, then a separate linked-list of the control statement and associated mnemonics is maintained with a node for each. Prior to parsing, a preprocessor is invoked which replaces all instances of a macro with its definition in-line. When the instruction is defined by a singleton meta-mnemonic, compound meta-mnemonic or expression of meta-mnemonics, an additional component is added to each instruction node that contains the pointer of the expression for the instruction. The singleton meta-mnemonics and compound meta-mnemonics are converted 410 to an simple expression which contain only the value of the meta-mnemonic, best seen by referring to the process 400 depicted in
Meta-mnemonics as herein disclosed have more flexibility than the macro-replacement or group identifier methods, utilize less storage and processing time, and are easier to maintain. Additionally, embodiments of the invention provide for: increased speed of generating a testcase by utilizing less internal storage/structures as expanded macros; reduced maintenance/duplication; reduced need for updating multiple macros; reduced need for creating new macros; ease of temporarily disabling instructions; increased flexibility of selecting instructions to select from; set expression support; conditionally selecting sets and dynamically-resolved classes (predefined or user-defined) that reduce the number of templates and overhead for specific initialization files and environments; and, implicit filtering for instruction flow type (sequential vs. non-sequential), which reduces the need for an explicit definition for each instruction.
While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed as the best mode contemplated for carrying out this invention, but that the invention will include all embodiments falling within the scope of the appended claims. Moreover, the use of the terms first, second, etc. do not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another. Furthermore, the use of the terms a, an, etc. do not denote a limitation of quantity, but rather denote the presence of at least one of the referenced item.
Patent | Priority | Assignee | Title |
10061672, | Mar 07 2013 | International Business Machines Corporation | Implementing random content of program loops in random test generation for processor verification |
7356436, | Feb 02 2005 | Meta Platforms, Inc | Method, system, and storage medium for estimating and improving test case generation |
7904270, | Feb 02 2005 | Meta Platforms, Inc | System for estimating and improving test case generation |
7917326, | Feb 02 2005 | Meta Platforms, Inc | Storage medium for estimating and improving test case generation |
8140901, | Nov 30 2009 | International Business Machines Corporation | Validation of processors using a self-generating test case framework |
8423968, | Feb 11 2008 | International Business Machines Corporation | Template-based vertical microcode instruction trace generation |
8621410, | Jun 24 2004 | FTL Systems, Inc. | Multiprocessor computer system and method having at least one processor with a dynamically reconfigurable instruction set |
9244664, | Apr 28 2014 | VISUALON, INC | System for video development kits with control of executable size |
9251023, | Mar 07 2013 | International Business Machines Corporation | Implementing automated memory address recording in constrained random test generation for verification of processor hardware designs |
Patent | Priority | Assignee | Title |
3930236, | |||
4155120, | Dec 01 1977 | Unisys Corporation | Apparatus and method for controlling microinstruction sequencing by selectively inhibiting microinstruction execution |
4179737, | Dec 23 1977 | Unisys Corporation | Means and methods for providing greater speed and flexibility of microinstruction sequencing |
4393469, | Apr 01 1975 | ALCATEL N V , DE LAIRESSESTRAAT 153, 1075 HK AMSTERDAM, THE NETHERLANDS, A CORP OF THE NETHERLANDS | Process control apparatus |
4875160, | Jul 20 1988 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Method for implementing synchronous pipeline exception recovery |
4907192, | Nov 08 1985 | NEC Electronics Corporation | Microprogram control unit having multiway branch |
5274775, | Jan 22 1991 | The United States of America as represented by the Secretary of the Navy; UNITED STATES OF AMERICA, THE AS REPRESENTED BY THE SECRETARY OF THE NAVY | Process control apparatus for executing program instructions |
5371862, | Feb 27 1991 | Kabushiki Kaisha Toshiba | Program execution control system |
5386569, | Jan 23 1992 | Mitsubishi Denki Kabushiki Kaisha | Programmable controller having directly executable CPU instructions |
5448746, | May 04 1990 | International Business Machines Corporation | System for comounding instructions in a byte stream prior to fetching and identifying the instructions for execution |
5485411, | Nov 30 1993 | Texas Instruments Incorporated | Three input arithmetic logic unit forming the sum of a first input anded with a first boolean combination of a second input and a third input plus a second boolean combination of the second and third inputs |
5515521, | Feb 08 1994 | TU, WEICHI; CHEN, CHIH-NONG | Circuit and method for reducing delays associated with contention interference between code fetches and operand accesses of a microprocessor |
5802373, | Jan 29 1996 | Hewlett Packard Enterprise Development LP | Method for providing a pipeline interpreter for a variable length instruction set |
5872962, | May 24 1995 | Fuji Xerox Co., Ltd. | Program control system |
5905891, | Jan 23 1992 | Mitsubishi Denki Kabushiki Kaisha | Programmable controller having directly executable CPU instructions |
5951678, | Jul 25 1997 | CONVERSANT INTELLECTUAL PROPERTY MANAGEMENT INC | Method and apparatus for controlling conditional branch execution in a data processor |
5996070, | Jul 30 1996 | Mitsubishi Denki Kabushiki Kaisha | Microprocessor capable of executing condition execution instructions using encoded condition execution field in the instructions |
6091897, | Jan 29 1996 | Hewlett Packard Enterprise Development LP | Fast translation and execution of a computer program on a non-native architecture by use of background translator |
6108776, | Apr 30 1998 | International Business Machines Corporation | Globally or selectively disabling branch history table operations during sensitive portion of millicode routine in millimode supporting computer |
6125444, | Apr 30 1998 | International Business Machines Corporation | Millimode capable computer system providing global branch history table disables and separate millicode disables which enable millicode disable to be turned off for some sections of code execution but not disabled for all |
6226789, | Jan 29 1996 | Hewlett Packard Enterprise Development LP | Method and apparatus for data flow analysis |
6367076, | Mar 13 1998 | Kabushiki Kaisha Toshiba | Compiling method and memory storing the program code |
6502237, | Jan 29 1996 | Hewlett Packard Enterprise Development LP | Method and apparatus for performing binary translation method and apparatus for performing binary translation |
6658560, | Mar 29 1999 | Matsushita Electric Industrial Co., Ltd. | Program translator and processor |
6782518, | Mar 28 2002 | GLOBALFOUNDRIES Inc | System and method for facilitating coverage feedback testcase generation reproducibility |
6799315, | Apr 08 1998 | Matsushita Electric Industrial Co. Ltd. | High speed virtual machine and compiler |
6973640, | Oct 04 2000 | Oracle International Corporation | System and method for computer code generation |
6996803, | Nov 15 1994 | Hitachi, Ltd. | Program generation method |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 10 2003 | DECKER, MARK H | International Business Machines Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 013786 | /0450 | |
Feb 14 2003 | International Business Machines Corporation | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Oct 02 2006 | ASPN: Payor Number Assigned. |
Jun 28 2010 | REM: Maintenance Fee Reminder Mailed. |
Nov 21 2010 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Nov 21 2009 | 4 years fee payment window open |
May 21 2010 | 6 months grace period start (w surcharge) |
Nov 21 2010 | patent expiry (for year 4) |
Nov 21 2012 | 2 years to revive unintentionally abandoned end. (for year 4) |
Nov 21 2013 | 8 years fee payment window open |
May 21 2014 | 6 months grace period start (w surcharge) |
Nov 21 2014 | patent expiry (for year 8) |
Nov 21 2016 | 2 years to revive unintentionally abandoned end. (for year 8) |
Nov 21 2017 | 12 years fee payment window open |
May 21 2018 | 6 months grace period start (w surcharge) |
Nov 21 2018 | patent expiry (for year 12) |
Nov 21 2020 | 2 years to revive unintentionally abandoned end. (for year 12) |