Substituting portion of template instruction parameter with selected virtual instruction parameter
First Claim
Patent Images
1. A pipelined microprocessor, comprising:
- instruction decode logic;
a program counter configured to indicate a current location in a first instruction sequence;
instruction fetch. Logic configured to fetch a first instruction from the current location in the first instruction sequence; and
a parameter selectorconfigured to, if the fetched first instruction from the first instruction sequence is a virtual instruction having one or more parameters, select a parameter from the one or more parameters of the first instruction based on control data, andwherein the instruction fetch logic is further configured to;
maintain the first program counter at the address of the virtual instruction,select a second instruction sequence based on the virtual instruction,modify the selected parameter, wherein the modification of the selected parameter comprises sign-extending the selected parameter,substitute the modified parameter from the first instruction into a second instruction, the second instruction being from the second instruction sequence,pass each instruction of the second instruction sequence to the instruction decode logic, andafter the second instruction sequence has been executed or an exception occurs, advance the program counter and resume the first instruction sequence.
3 Assignments
0 Petitions
Accused Products
Abstract
A configurable instruction set architecture is provided whereby a single virtual instruction may be used to generate a sequence of instructions. Dynamic parameter substitution may be used to substitute parameters specified by a virtual instruction into instructions within a virtual instruction sequence.
237 Citations
16 Claims
-
1. A pipelined microprocessor, comprising:
-
instruction decode logic; a program counter configured to indicate a current location in a first instruction sequence; instruction fetch. Logic configured to fetch a first instruction from the current location in the first instruction sequence; and a parameter selector configured to, if the fetched first instruction from the first instruction sequence is a virtual instruction having one or more parameters, select a parameter from the one or more parameters of the first instruction based on control data, and wherein the instruction fetch logic is further configured to; maintain the first program counter at the address of the virtual instruction, select a second instruction sequence based on the virtual instruction, modify the selected parameter, wherein the modification of the selected parameter comprises sign-extending the selected parameter, substitute the modified parameter from the first instruction into a second instruction, the second instruction being from the second instruction sequence, pass each instruction of the second instruction sequence to the instruction decode logic, and after the second instruction sequence has been executed or an exception occurs, advance the program counter and resume the first instruction sequence. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for implementing virtual instructions in a processor, the method comprising:
-
fetching a virtual instruction from a first sequence of instructions, wherein the virtual instruction has one or more parameters; determining a second sequence of instructions to be executed based on the virtual instruction; selecting an instruction from the second sequence of instructions; selecting a parameter from the one or more parameters of the virtual instruction based on control data; modifying the selected parameter, wherein the modification of the selected parameter comprises sign-extending the selected parameter; substituting a parameter of the selected instruction with the modified parameter from the virtual instruction; passing each of the second sequence of instructions to the instruction decode logic; and resuming the fetching of instructions from the first sequence of instructions.
-
-
10. A pipelined microprocessor, comprising:
-
instruction decode logic; a program counter configured to indicate a current location in a first instruction sequence; instruction fetch logic configured to fetch a first instruction from the current location in the first instruction sequence; and a parameter selector configured to, if the fetched first instructions a virtual instruction having one or more parameters, select a first parameter from the one or more parameters of the first instruction based on control data, and wherein the instruction fetch logic is further configured to; maintain the first program counter at the address of the virtual instruction, select a second instruction sequence based on the virtual instruction, select a second parameter from a second instruction in the second instruction sequence; modify the second parameter, wherein the modification replaces a portion of the second parameter with the first parameter, pass each instruction of the second instruction sequence to the instruction decode logic, and after the second instruction sequence has been executed or an exception occurs, advance the program counter and resume the first instruction sequence.
-
-
11. A method for implementing virtual instructions in a processor, the method comprising:
-
fetching a virtual instruction from a first sequence of instructions, wherein the virtual instruction has one or more parameters; determining a second sequence of instructions to be executed based on the virtual instruction; selecting an instruction from the second sequence of instructions; selecting a first and second parameter from the one or more parameters of the virtual instruction based on control data; selecting a third parameter from the second instruction; modifying the third parameter based on the first and second parameters, wherein the modification of the third parameter comprises at least one of; concatenating the first parameter with the second parameter, and replacing the third parameter with the concatenated first and second parameters, passing each of the second sequence of instructions to the instruction decode logic; and resuming the fetching of instructions from the first sequence of instructions. - View Dependent Claims (12, 13, 14, 15, 16)
-
Specification