Conditional Operations in Vector Processors

By introducing a vector index register (VIR) and a multiplexer into the vector processor, the performance suppression problem caused by the scalar index register is solved, enabling efficient execution of vector operations and conditional operations, thereby improving the performance and power efficiency of the vector processor.

CN113841117BActive Publication Date: 2024-09-20MICRON TECHNOLOGY INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080036707.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-05-20
Filing Date
2020-04-17
Publication Date
2024-09-20
Estimated Expiration
2040-04-17

AI Technical Summary

Technical Problem

When using scalar index registers for vector operations in existing vector processors, there is a performance suppression problem. The index register needs to be frequently incremented to access multiple positions of the operand vector, resulting in low efficiency.

Method used

Multiple addresses are stored in a vector index register (VIR) to facilitate direct access to multiple positions in the vector, avoiding continuous changes to the scalar index register during vector operations. Efficient execution of vector operations is achieved through selective indexing and multiplexers.

Benefits of technology

It improves the performance of the vector processor, reduces decoding and loading time, enhances the efficiency and power efficiency of vector operations, and supports conditional operations and vector compression/expansion functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113841117B_ABST
    Figure CN113841117B_ABST
Patent Text Reader

Abstract

Vector index registers for storing or loading indices of true and / or false results of conditional operations in a vector processor are disclosed herein. Each of the vector index registers stores multiple addresses for accessing multiple locations in an operand vector in various types of operations.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related Applications

[0002] This application claims priority to U.S. Patent Application No. 16 / 417,508, filed on May 20, 2019, and entitled “CONDITIONAL OPERATIONS IN A VECTOR PROCESSOR,” the entire disclosure of which is hereby incorporated by reference herein. Technical Field

[0003] In general, at least some embodiments disclosed herein relate to vector processors. Also, at least some embodiments disclosed herein relate to registers in a vector processor that store addresses for storing vectors. Background Art

[0004] A vector processor may be or include a central processing unit (CPU) that implements an instruction set containing instructions that operate on arrays of data, often referred to as vectors. This is in contrast to a scalar processor, where instructions operate on single data items. Vector processors can greatly improve performance on certain workloads, particularly numerical simulations and similar tasks, compared to scalar processors. Vector processors appeared in the early 1970s, and most supercomputing designs were built from the 1970s to the 1990s. The cost-effectiveness of more conventional microprocessor designs, such as scalar processor designs, declined rapidly, resulting in less development and manufacture of vector processors.

[0005] In general, conventional CPUs (e.g., scalar-based CPUs) are capable of manipulating, at most, a few pieces of data at a time. For example, such CPUs have instructions that essentially provide to add A to B and store the result in C. The data is typically pointed to by passing in an address to a memory location that holds the data for A, B, and C. It takes some time to decode this address and get the data from memory, during which time the CPU may be idle waiting for the requested data to appear.

[0006] To shorten the amount of time consumed by these steps, more modern CPUs use a technique called instruction pipelining, in which instructions are passed through several subunits in sequence. The first subunit reads the address and decodes it, the next subunit gets the value at those addresses, and the next subunit performs mathematical operations itself. With pipelining, the CPU begins decoding the next instruction even before the first instruction has left the CPU, similar to an assembly line. In this way, the address decoder and the other mentioned parts are in use simultaneously and constantly. Due to pipelining, any instruction will take the same amount of time to complete.

[0007] Vector processors improve pipelining by not just pipelining instructions, but such processors also pipelining the data itself. Thus, rather than the vector processor having to continually decode instructions and then fetch the data needed to complete the instruction, the vector processor reads a single instruction from memory. This allows for faster decode times and reduced power consumption (e.g., decoding once with a vector processor, rather than multiple times).

[0008] Vector processors and other types of processors such as common scalar processors include index registers for modifying operand addresses during the execution of a program or operation. Indexes are often used, and indexes are useful for performing vector or array operations. The content of an index register can be added or subtracted from an immediate address to form an effective address for actual data or an operand. Typically, an instruction can test an index register, and if the test fails, the instruction can reset the beginning of the loop. Some instruction sets allow the use of multiple index registers.

[0009] Generally, it is known to use scalar registers for indexing. In other words, it is known to use scalar index registers. However, there are many limitations associated with using scalar registers for indexing. And, some of these limitations may inhibit the performance of processors that use index registers. For example, in order to access multiple locations of an operand vector, a scalar index register needs to be incremented, and each increment needs to be loaded separately by the processor for accessing the operand vector. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The present disclosure will be more fully understood from the detailed description provided below and the accompanying drawings of various embodiments of the present disclosure.

[0011] Figure 1 An example portion of an example computing device 100 is illustrated in accordance with some embodiments of the present disclosure.

[0012] Figure 2 An example portion of an example computing device 200 is illustrated in accordance with some embodiments of the present disclosure.

[0013] Figure 3 An example system 300 including a vector index register 302 is illustrated in accordance with some embodiments of the present disclosure.

[0014] Figure 4 An example system 400 including vector index registers 402a, 402b, and 402c is illustrated in accordance with some embodiments of the present disclosure.

[0015] Figure 5 An example system 500 including a vector index register 502 and a vector first register 503 is illustrated according to some embodiments of the present disclosure.

[0016] Figure 6 Example operations of method 600 for accessing elements of an operand vector are illustrated according to some embodiments of the present disclosure.

[0017] Figure 7 Example operations of method 700 for compressing elements of an operand vector are illustrated according to some embodiments of the present disclosure.

[0018] Figure 8 An example system 800 is illustrated that includes a vector index register 802 for compressing elements of an input operand vector stored in an input OVR 804 in accordance with some embodiments of the present disclosure.

[0019] Fig. 9 Example operations of a method 900 for expanding elements of an operand vector (eg, elements of a compressed operand vector) are illustrated in accordance with some embodiments of the present disclosure.

[0020] Fig.10 Example operations of method 1000 are illustrated with respect to operations on a plurality of compressed vectors in accordance with some embodiments of the present disclosure.

[0021] Fig.11 Illustrate example operations of method 1100 for constructing indexed vectors to store in vector index registers (VIR_TRUE and VIR_FALSE) for true (TRUE) and false (FALSE) results (e.g., "0" and "1" results) for comparisons in accordance with some embodiments of the present disclosure.

[0022] Fig.12 An example system 1200 is illustrated for constructing indexed vectors for storage in VIR_TRUE 1202a and VIR_FALSE 1202b according to some embodiments of the present disclosure.

[0023] Fig.13 Example operations of method 1300 for constructing a combined indexing vector for storage in a combined vector index register (VIR_combined) for TRUE and FALSE results of comparisons are illustrated in accordance with some embodiments of the present disclosure.

[0024] Fig.14 An example system 1400 for constructing a combined indexing vector for storage in VIR_combined 1402 is illustrated in accordance with some embodiments of the present disclosure.

[0025] Fig.15 An example system 1500 including VIR_TRUE 1502a and VIR_FALSE 1502b is illustrated according to some embodiments of the present disclosure.

[0026] Fig.16 Example operations of method 1600 for compressing elements of an operand vector according to VIR_TRUE are illustrated in accordance with some embodiments of the present disclosure.

[0027] Fig.17 An example system 1700 is illustrated that includes a VIR_TRUE 1702a for compressing elements of an input operand vector stored in an input OVR 1704 in accordance with some embodiments of the present disclosure.

[0028] Fig.18 and 19 Each illustrates example operations for constructing indexed vectors to store in vector index registers (VIR_TRUE and VIR_FALSE) for TRUE and FALSE results (eg, “0” and “1” results) for conditional test operations according to some embodiments of the present disclosure.

[0029] Fig. 20 An example system 2000 is illustrated for constructing indexed vectors for storage in VIR_TRUE 2002a and VIR_FALSE 2002b according to some embodiments of the present disclosure.

[0030] Fig.21 and 22 Example operations of method 2100 for performing operations on elements of an operand vector according to VIR_TRUE and VIR_FALSE (or the TRUE and FALSE segments of VIR_COMBINED) are illustrated in accordance with some embodiments of the present disclosure.

[0031] Fig.23 An example system 2200 including VIR_TRUE and VIR_FALSE for performing a first operation and a second operation on elements of an input operand vector stored in an input operand vector register is illustrated in accordance with some embodiments of the present disclosure.

[0032] Fig.24 An example system 2300 is illustrated that includes a TRUE section and a FALSE section of VIR_COMBINED for performing a first operation and a second operation on elements of an input operand vector stored in an input operand vector register according to some embodiments of the present disclosure.

[0033] Fig.25An example system 2400 including VIR_TRUE and VIR_FALSE for performing a first operation and a second operation in parallel on elements of an input operand vector stored in an input operand vector register is illustrated according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0034] In general, at least some of the embodiments disclosed herein relate to vector processors. Furthermore, at least some of the embodiments disclosed herein relate to registers in a vector processor that store addresses for accessing vectors. Furthermore, at least some of the embodiments disclosed herein are vector index registers in a vector processor that each store a plurality of addresses for accessing a plurality of locations in a vector.

[0035] It is known to use scalar index registers in vector processors to refer to multiple positions of a vector by changing the value stored in the scalar index register during a vector operation. However, by using a vector index register to index multiple positions of one or more operand vectors, the scalar index register can be replaced and at least continuous changes of the value in the scalar index register during a vector operation can be avoided. This is only one example of a technical solution to the technical problem described herein.

[0036] A scalar or single-entry register can store an index i that allows an operation on a vector register to start at element i, or an operation can start at element zero. Subsequent portions of the operation access element 0+1 or i+1 at each increment. As a side note, using a single-entry register storing index i can be used for vector first operations and indexing, which is also disclosed to some extent herein.

[0037] However, there are many limitations associated with using scalar registers or single-entry vectors for indexing. And some of these limitations can inhibit the performance of vector processors that use index registers. For example, in order to access multiple locations of an operand vector, a scalar or single-entry index register needs to be incremented, and each increment needs to be loaded separately by the vector processor for accessing the operand vector.

[0038] By using vector index registers to index multiple positions of one or more operand vectors, scalar index registers may be replaced and at least continuous changing of scalar index registers during vector operations may be avoided.

[0039] Generally speaking, the embodiments disclosed herein provide specific technical solutions at least for the technical problems mentioned in the background part and other parts of the present application and other technical problems that are not described herein but recognized by those skilled in the art.

[0040] In some embodiments, a vector index register (VIR) may store address components for vector operations using selective indexing. This is somewhat similar to vector first processing or indexing. For example, using selective indexing, the VIR may store address portions i_1, i_2, ..., i_n. This allows operations on a vector register to move through elements i_1, i_2, ..., i_n of the input vector rather than i, i+1, i+2, ..., i+n of the input vector. For example, using selective indexing, the VIR may store non-sequential address portions i_1, i_3, ..., i_8. This allows operations on a vector register to move through non-sequential elements of the input vector.

[0041] There are many uses for VIR. For example, VIR can be used to implement vector compression or expansion functions more efficiently. For example, when a vector comparison operation generates an index vector of a selected element, the selected component can be loaded in VIR, which can be used for addressing in the generation of a compressed vector. The elements in VIR (or elements in VMX (i)) are address components for accessing non-contiguous elements in vector V (i). Instead of accessing V (i) via a single-entry index vector, where i = i + 1 for each iteration, the vector processor can access V (VMX (i)) in sequence, where i = + 1 for each iteration. Moreover, in this way, the components are only loaded once from VIR for use by the vector processor. If a single-entry index vector is used, such as a vector first register, the elements in the input vector are addressed by a counter starting with the value in the single-entry index vector. In order to use a single-entry index register, each address is loaded sequentially from the index register. Again, through VIR, each address or address component stored in VIR is only loaded once at the same time. This produces a significant performance improvement for vector processors using VIR.

[0042] In some embodiments, a counter (e.g., a counter register) may drive the VIR. Furthermore, a multiplexer (e.g., an N:1 multiplexer (i.e., a multiple-input single-output multiplexer)) may be used to selectively switch between the outputs of the counter to generate an output to access a specific location of an operand register for each vector iteration, or to generate an index from the VIR to access a specific location of an operand register for each iteration of the counter.

[0043] The foregoing features and other features disclosed herein can be used for conditional operations. For example, one of the circuits disclosed herein can generate one or more index vectors instead of generating vector mask registers for conditional operations on vectors. Then, using the index vectors, the branches of the vector mask registers can be evaluated via corresponding VIRs respectively. VIRs speed up the processing performed by the vector processor because the vector mask does not need to be generated or generated repeatedly, and the components of the mask do not need to be loaded separately in each iteration.

[0044] Such functionality may also be used for vector expansion operations and / or merging the results of vector operations into vector registers. For example, a VIR may be used to index in an operation B(VMX(i))=A(i), where "B(VMX(i)" is an expanded compressed vector A. Also, a VIR may be used to index in an operation B(VMX(i))=A(i)+a, where "B(VMX(i)" is an expanded compressed vector A, and a scalar value "a" is added to the expanded vector A. Also, a VIR may be used to index in an operation B(VMX(i))=function(A(VMX(i)),C(VMX(i)), where the processor performs the operation on vectors A and C for the elements marked "VMX" selected via the VIR. This is an example of conditional processing and may also be used for nested conditional processing.

[0045] The index value or addressing component stored in the VIR (e.g., [2, 4, 5, 8] for accessing elements within the operand vector register (OVR)) can be converted to a memory address (e.g., a base address plus an increment for each memory cell). Thus, the outputs described herein, such as the outputs of the multiplexers described herein, can be converted to memory addresses for directly accessing vectors in main memory in a manner similar to accessing the operand vector register (OVR).

[0046] Figure 1 An example portion of an example computing device 100 according to some embodiments of the present disclosure is illustrated. As shown, the device 100 may be communicatively coupled to one or more networks 112. The device 100 includes a vector processor 102 according to some embodiments of the present disclosure. The device 100 also includes at least one bus 104, a main memory 106, a data storage system 108, and a network interface 110. The bus 104 communicatively couples the vector processor 102, the main memory 106, the data storage system 108, and the network interface 110. The device 100 includes a computer system that includes at least the vector processor 102, the main memory 106 (e.g., a read-only memory (ROM), a flash memory, a dynamic random access memory (DRAM) such as a synchronous DRAM (SDRAM) or a Rambus DRAM (RDRAM), a static random access memory (SRAM), etc.), and a data storage system 108 that communicate with each other via the bus 104 (which may include multiple buses).

[0047] in other words, Figure 11 is a block diagram of an example apparatus 100 having a computer system in which embodiments of the present disclosure may be operated. In some embodiments, the computer system may include a set of instructions for causing the machine to perform any one or more of the methodologies discussed herein when executed. In such embodiments, the machine may be connected (e.g., via a network interface 110) to other machines in a LAN, an intranet, an extranet, and / or the Internet (e.g., network 112). The machine may also operate in the capacity of a server or a client machine in a client-server network environment as a peer machine in a peer-to-peer (or distributed) network environment (e.g., the peer-to-peer network described herein) or as a server or a client machine in a cloud computing infrastructure or environment.

[0048] The vector processor 102 represents one or more vector processors according to some embodiments of the present disclosure. The vector processor 102 may include a microprocessor, a central processing unit, or the like. More specifically, the vector processor 102 may include a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, or a processor that implements other instruction sets, or a processor that implements a combination of instruction sets, as long as the processor uses: vector instructions, vector registers, vector priority, and multi-channel configuration. The vector processor 102 may also be one or more special processing devices, such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), a graphics processing unit (GPU), a network processor, etc. The vector processor 102 may be configured to execute instructions for performing the operations and steps discussed herein. The vector processor 102 may further include a network interface device such as a network interface 110 to communicate through one or more communication networks (such as a network 112).

[0049] The data storage system 108 may include a machine-readable storage medium (also referred to as a computer-readable medium) and may embody at least some aspects of one or more of the methods or functions described herein, the machine-readable storage medium having one or more sets of instructions or software stored thereon. The data storage system 108 may include a non-volatile storage device. The instructions may also reside completely or at least partially within the main memory 106 and / or within the vector processor 102 during their execution by the computer system, and the main memory 106 and the vector processor 102 may also constitute machine-readable storage media. Although the memory, vector processor, and data storage device portions are shown in the example embodiment as each being a single portion, each portion should be considered to include a single portion or multiple portions that can store instructions and perform their corresponding operations. The term "machine-readable storage medium" should also be considered to include any medium that is capable of storing or encoding a set of instructions for execution by a machine and causing the machine to perform any one or more of the methods of the present disclosure. Therefore, the term "machine-readable storage medium" should be considered to include, but not limited to, solid-state memory, optical media, and magnetic media.

[0050] Figure 2 1 and 2 illustrate an example portion of an example computing device 200 according to some embodiments of the present disclosure. As shown, the computing device 200 includes a vector processor 102 and a bus 104 and a main memory 106 (e.g., see Figure 1 ). The computing device 200 may also be or include the computing device 100.

[0051] like Figure 2 , the vector processor 102 includes a vector register 202, a scalar register 204, a bus 206, an arithmetic logic unit 208 (ALU 208), and a vector load storage unit 210. Other embodiments of the computing device 200 may include a scalar register 204 that is located outside the vector processor 102 or in a unit of the vector processor that is separate from the unit in the vector processor that has the vector register 202. The bus 206 communicatively couples the vector register 202, the scalar register 204, the arithmetic logic unit (ALU) 208, and the vector load storage unit 210, and such components may communicate with each other via the bus 206 (which may include multiple buses). The vector register 202 includes multiple vector registers. And, the ALU 208 includes multiple ALUs, such as arithmetic logic unit (ALU) 0, ALU 1, and ALU N.

[0052] The vector processor 102 includes at least one vector index register. The vector processor 102 may be or include one or more central processing units (CPUs) that implement instructions that operate on one-dimensional arrays of data symmetrically referred to as vectors.

[0053] The vector registers 202 in the vector processor 102 may include operand vector registers (i.e., input vector registers), result vector registers (i.e., output vector registers), and vector index registers that store values ​​for accessing elements in the operand vector registers and / or result vector registers. The values ​​in the accessed elements of the operand vector registers and / or result vector registers may be used as inputs to one or more ALUs such as the ALU 208.

[0054] Generally speaking, the vector processor 102 may include index registers, which may include scalar index registers and vector index registers, such as Figure 3 , 4 and the vector index register described in 5.

[0055] The scalar registers 204 of the vector processor 102 may include scalar index registers as well as operand scalar registers (i.e., input scalar registers) and result scalar registers (i.e., output scalar registers). At least some of the scalar registers may provide index and control values ​​for many different types of operations on scalars and vectors. Moreover, the scalar registers may also provide numerical values ​​used by vector instructions. For example, a vector provided by a vector register may be multiplied by a scalar provided by a scalar register.

[0056] At least some of the scalar registers 204 and the vector registers 202 may be connected to a corresponding ALU of the ALU 208. The ALUs in the ALU 208 may include combinatorial digital electronic circuits that perform arithmetic and bitwise operations on integer binary numbers. In the vector processor 102, if the output vector register is providing feedback in operation, then the ALUs in the ALU 208 may be connected to the input vector registers, and in some cases to the output vector registers. In such cases, the output vector registers are both the input vector and the output vector.

[0057] Also, scalar registers 204 may include programmable scalar registers. Programmable scalar registers may be used so that a vector provided by a vector register (e.g., one of vector registers 202) may operate on a scalar provided by and programmed into one of the programmable scalar registers. For example, one of the operations may include vector multiplication by a scalar value (e.g., vector A(i)×scalar p).

[0058] The depicted bus 206 may be configured to communicatively couple the vector load store unit 210, the vector registers 202, the scalar registers 204, and the arithmetic logic unit 208. The bus 206 may include a 2:1 multiplexer, a 3:1 multiplexer, or an N:1 multiplexer configured to receive input from a vector index register and output an address or address component for accessing an operand vector (e.g., see Figure 3 , 4 and 5).

[0059] The vector load store unit 210 includes circuitry for executing load and store instructions, generating addresses for load and store vector operations, and loading data from memory or storing data back to memory from registers of the vector processor 102. The vector load store unit 210 may perform many of the operations described herein, including Figures 6 to 10 Many operations of methods 600, 700, 900 and 1000 in.

[0060] Each of the computing devices described herein may be a machine capable of executing (sequentially or otherwise) a set of instructions that specify actions to be taken by the machine. Figure 1 and 2 Each of the illustrated computing devices illustrates a single machine, but the term "machine" shall also be taken to include any collection of machines that individually or jointly execute one (or more) sets of instructions to perform any one or more of the methodologies or operations discussed herein. Furthermore, each of the illustrated computing devices may each include at least a bus and / or motherboard, one or more controllers (e.g., one or more CPUs), a main memory that may include a temporary data storage device, at least one type of network interface, a storage system that may include a permanent data storage device, and / or any combination thereof.

[0061] In the discussion Figure 3 , 4 Before describing the systems 300, 400, and 500 depicted in DO and 5, it is important to understand that elements in a vector register may be addressed using at least one index from a vector index register (VIR) or another type of register, such as a counter register. In general, when a counter register is used, the counter adds 1 to itself for each iteration or step in a DO or FOR loop, thereby generating an address for the next iteration or step. The VIR need not be driven by a counter, but it may be used to cause the VIR to be driven by a counter. A common counter may both drive the VIR and provide a separate input to a receive multiplexer that outputs address components used to access an operand vector in a vector operation.

[0062] For example, the VIR may store a vector VMX, where VMX(i) and i=0, 1, ..., n-1. A simple application example of the use of the VIR would be a compression operation, such as B(i)=A(VMX(i)). Moreover, when another vector register stores a vector A, the elements of A are A(i), where i=0, 1, 2, ..., n. In a normal mode (such as when a counter output is selected for use by a multiplexer), the processor may perform A+a, where "a" is a scaler from the counter through the multiplexer. The result is stored in the output vector register B, where B(i)=A(i)+a, and where i=0, 1, ..., n-1. In a mode using the VIR (e.g., an alternative selection control of the multiplexer), the processor may perform A(VMX)+a by using an address generated from the output of the VIR. Thus, the output vector register has B, where B(i)=A(VMX(i))+a, and where i=0, 1, ..., n-1. Also, for example, a vector processor may be configured to operate on two vectors, such as B(i)=Function(A(VMX(i)), C(VMX(i)), where "Function" is implemented via the ALU.

[0063] Figure 3 An example system 300 including a vector index register 302 is illustrated in accordance with some embodiments of the present disclosure.

[0064] System 300 may be a vector processor 102 (eg, see Figure 1 The system 300 includes a vector index register 302 (VIR 302), a counter register 304, a 2:1 multiplexer 306, and a select register 308 connected to the multiplexer. The VIR 302 may be Figure 2 The counter register 304 and the select register 308 may be registers in the scalar register 204. The 2:1 multiplexer 306 may be Figure 2 bus 206 shown in or Figure 1 A portion of bus 104 is shown in FIG.

[0065] System 300 may be part of a vector processor including a plurality of arithmetic logic units (ALUs). The vector processor may also include a plurality of operand vector registers (OVRs). The OVRs may be configured to store elements of operand vectors to be used as inputs to vector operations of the ALUs.

[0066] VIR 302 may be configured to store multiple address components corresponding to multiple locations in the OVR. Each address component may be added to the effective address for accessing the corresponding location in the OVR. Each location of the OVR may contain an element of an operand vector to be operated on by the ALU.

[0067] In some embodiments, the length of the example OVR may be 64 bits. If the operand is smaller than 64 bits (e.g., a 32-bit integer), the operand may be right-aligned. In such examples, the indexing techniques described herein apply similarly. For example, the OVR may include padding in its elements to accommodate different data types.

[0068] As shown, counter register 304 is part of system 300. Counter register 304 may also be part of a vector processor with system 300. Counter register 304 may be configured to store count 310. Count 310 may be added to the effective address used to access the OVR, or the count may be used by the vector processor to iterate over multiple address components stored in VIR 302.

[0069] As shown, a 2:1 multiplexer 306 is part of the system 300. The 2:1 multiplexer 306 may also be part of a vector processor having the system 300. The 2:1 multiplexer 306 may be configured to receive as inputs a count 310 from the counter register 304 and an output 312 from the VIR 302. The output 312 from the VIR 302 may include one of a plurality of address components of the VIR that corresponds to the count 310. The 2:1 multiplexer 306 may also be configured to receive as a select input a mode value 314. The mode value 314 may be or include a value for selecting the count 310 or a value for selecting the output 312 from the VIR 302. The 2:1 multiplexer 306 may also be configured to select the count 310 or the output 312 from the VIR 302 based on the received mode value 314. The 2:1 multiplexer 306 may also be configured to receive as inputs a mode value 314 from the counter register 304. The mode value 314 may be or include a value for selecting the count 310 or a value for selecting the output 312 from the VIR 302. The 2:1 multiplexer 306 may also be configured to select the count 310 or the output 312 from the VIR 302 based on the received mode value 314. The 2:1 multiplexer 306 may also be configured to receive as inputs a mode value 314 from the counter register 304. Figure 1 2) output and communicates a select output 316, which is one of the selected count or the selected output from the VIR. The select output 316 may be communicated to a requestor that accesses the OVR for the ALU. The requestor may be a vector load storage unit of a vector processor (e.g., see Figure 2 ) or a vector load-store unit of another vector processor.

[0070] When the requester is a vector load store unit, it may be configured to generate effective addresses for load and store operations of the vector processor. The vector load store unit may also be configured to, for each address component of the VIR, add the address component of the VIR to the effective address for accessing the corresponding location in the OVR.

[0071] Figure 4 An example system 400 including vector index registers 402a, 402b, and 402c is illustrated in accordance with some embodiments of the present disclosure.

[0072] System 400 may be a vector processor 102 (eg, see Figure 1 or 2) or more vector processors. System 400 includes a plurality of vector index registers, including vector index registers 402a, 402b, and 402c (VIRs 402a, 402b, and 402c). System 400 also includes a counter register 404, an N:1 multiplexer 406, and a select register 408 connected to the multiplexer. VIRs 402a, 402b, and 402c may be Figure 2 The counter register 404 and the select register 408 may be registers in the scalar register 204. The N:1 multiplexer 406 may be Figure 2 bus 206 shown in or Figure 1 . The N:1 multiplexer 406 is a multiplexer that can receive at least four inputs as shown. However, in some embodiments, the multiplexer 406 can receive far more than four inputs. The N:1 multiplexer 406 output can be one output for accessing an address component of an operand vector register (OVR).

[0073] System 400 may be part of a vector processor including an ALU in an ALU. A vector processor may also include an OVR in an OVR. The OVR may be configured to store elements of an operand vector to be used as input to a vector operation of the ALU.

[0074] Each of VIRs 402a, 402b, and 402c may be configured to store multiple address components corresponding to, for example, multiple locations in an OVR or three separate OVRs. In examples with multiple OVRs, there may be a separate multiplexer for each OVR. Also, in examples with multiple OVRs, there may be a separate addressing system, such as system 300, for each OVR. Each address component of multiple VIRs (e.g., VIRs 402a, 402b, and 402c) may be added to the effective address for accessing a corresponding location in an OVR or multiple OVRs. Each location of an OVR may contain an element of an operand vector to be operated on by the ALU.

[0075] As shown, counter register 404 is part of system 400. Counter register 404 may also be part of a vector processor with system 400. Counter register 404 may be configured to store count 410. Count 410 may be added to the effective address used to access one or more OVRs, or the count may be used by the vector processor to iterate over multiple address components stored in multiple VIRs (e.g., VIRs 402a, 402b, and 402c).

[0076] As shown, N:1 multiplexer 406 is part of system 400. N:1 multiplexer 406 may also be part of a vector processor having system 400. N:1 multiplexer 406 may be configured to receive count 410 from counter register 404 and outputs (e.g., outputs 412a, 412b, and 412c) from a plurality of VIRs (e.g., VIRs 402a, 402b, and 402c) as inputs. Outputs 412a, 412b, and 412c from VIRs 402a, 402b, and 402c may each include one of a plurality of address components of the respective VIR that corresponds to count 410. N:1 multiplexer 406 may also be configured to receive mode value 414 as a select input. Mode value 414 may be or include a value for selecting count 410 or, for example, a value for selecting outputs 412a, 412b, and 412c from VIRs 402a, 402b, and 402c. N:1 multiplexer 406 may also be configured to select count 410 or outputs 412a, 412b, and 412c from VIRs 402a, 402b, and 402c based on the received mode value 414. N:1 multiplexer 406 may also be configured to transmit the count 410 to the multiplexer 406 via a bus (e.g., Figure 1 416 can be transmitted to a requestor that accesses an OVR or multiple OVRs for an ALU or multiple ALUs. The requestor can be a vector load storage unit of a vector processor (e.g., see Figure 2 ) or a vector load store unit of another vector processor. When the requestor is a vector load store unit, it can be configured to generate effective addresses for load and store operations of the vector processor. The vector load store unit can also be configured to, for each address component of the VIR, add an address component to the effective address for accessing the corresponding location in the OVR.

[0077] In some embodiments, a vector processor having multiple VIRs may include a counter configured to store a count, and the count may be added to the effective address for accessing the OVR, or wherein the count is used to iterate each corresponding plurality of address components stored in the VIR. In such an example, the processor may also include an N:1 multiplexer configured to receive a count from the counter and a corresponding output from the VIR as input. Each output from a given VIR in the VIRs may include one of the multiple address components of the given VIR that corresponds to the count. The multiplexer may also be configured to receive a mode value as a selection input. The mode value may be a value for selecting a count or a value for selecting one of the corresponding outputs from the VIR. The multiplexer may also be configured to select one of the count or the corresponding output from the VIR according to the received mode value. The multiplexer may also be configured to communicate a selected count or one of the corresponding outputs from the VIR to a requester (e.g., such as a vector load store unit of a vector processor) accessing the OVR for the ALU.

[0078] Figure 5 An example system 500 including a vector index register 502 is illustrated in accordance with some embodiments of the present disclosure.

[0079] System 500 may be a vector processor 102 (eg, see Figure 1 The system 500 includes a vector index register 502 (VIR 502), a counter register 504, a 3:1 multiplexer 506, and a select register 508 connected to the multiplexer. The system 500 also includes a vector first register 503 connected to the multiplexer 506. The VIR 502 may be Figure 2 The counter register 504, the select register 508, and the vector first register 503 (VFR 503) may be registers in the scalar register 204. The 3:1 multiplexer 506 may be Figure 2 bus 206 shown in or Figure 1 A portion of bus 104 is shown in FIG.

[0080] System 500 may be part of a vector processor including a plurality of arithmetic logic units (ALUs). The vector processor may also include a plurality of operand vector registers (OVRs). The OVRs may be configured to store elements of an operand vector to be used as inputs to vector operations of the ALUs. VIR 502 may be configured to store a plurality of address components corresponding to a plurality of locations in the OVRs. Each address component may be added to an effective address for accessing a corresponding location in the OVR. Each location of the OVR may contain an element of an operand vector to be operated on by the ALU.

[0081] The VFR 503 may be configured to store a single address component 511. The single address component 511 is an address component that directs initial access of the OVR at an initial position of the OVR based on the single address component 511 so that the initial position accessed is not the first position of the OVR. For example, if the VFR 503 stores a scalar "3", then the fourth position of the OVR is initially accessed during a vector operation of the OVR. This replaces accessing the OVR starting at the first position of the OVR (e.g., OVR(0)).

[0082] As shown, counter register 504 is part of system 500. Counter register 504 may also be part of a vector processor with system 500. Counter register 504 may be configured to store count 510. Count 510 may be added to the effective address used to access the OVR, or the count may be used by the vector processor to iterate over multiple address components stored in VIR 502. Also, count 510 may be used by the vector processor to increment a single address component 511 of VFR 503, or as shown, it may be added to the single address component 511, and the sum of count 510 and the single address component 511 is the vector first address component 513.

[0083] As shown, a 3:1 multiplexer 506 is part of the system 500. The 3:1 multiplexer 506 may also be part of a vector processor having the system 500. The 3:1 multiplexer 506 may be configured to receive as inputs a count 510 from the counter register 504 and an output 512 from the VIR 502 and a vector first address component 513 of the sum of the output of the VFR 503 and the counter 504. The output 512 from the VIR 502 may include one of the multiple address components of the VIR that corresponds to the count 510. The 3:1 multiplexer 506 may also be configured to receive a mode value 514 as a select input. The mode value 514 may be or include a value for selecting the count 510 or a value for selecting the output 512 from the VIR 502 or a value for selecting the vector first address component 513 of the sum of the output of the VFR 503 and the counter 504. The 3:1 multiplexer 506 may also be configured to select the count 510 or the output 512 from the VIR 502 or the vector first address component 513 according to the received mode value 514. The 3:1 multiplexer 506 may also be configured to receive the vector first address component 513 via a bus (eg, Figure 1 2) output and communicates a select output 516, which is one of the selected count or the selected output from the VIR or the vector first address component 513. The select output 516 can be communicated to a requestor that accesses the OVR for the ALU. The requestor can be a vector load storage unit of a vector processor (e.g., see Figure 2 ) or a vector load store unit of another vector processor. When the requestor is a vector load store unit, it can be configured to generate effective addresses for load and store operations of the vector processor. The vector load store unit can also be configured to, for each address component of the VIR, add the address component of the VIR to the effective address for accessing the corresponding location in the OVR.

[0084] In some embodiments, a vector processor having at least one VIR may also include at least one VFR and at least one corresponding counter connected to the VIR and the VFR. The counter may be configured to store a count. The count may be added to an effective address for accessing the OVR. The count may be used to increment the vector first address component, or the count may be used to iterate multiple address components stored in the VIR. The vector processor may also include a 3:1 multiplexer configured to receive a count from the counter, an output from the VFR, and an output from the VIR as input. The output from the VIR may include an address component corresponding to the count in multiple address components of the VIR, and the vector first address component may also correspond to the count. The multiplexer may be configured to receive a mode value as a selection input. The mode value may be a value for selecting a count, a value for selecting an output from the VFR, or a value for selecting an output from the VIR. The multiplexer may be configured to select a count, an output from the VFR, or an output from the VIR based on a received mode value, and communicate the selected count, the selected output from the VFR, or the selected output from the VIR to a requestor accessing the OVR for the ALU (e.g., such as a vector load store unit of a vector processor).

[0085] Not present Figures 3 to 5 , the system may include a respective vector length register for each VIR in the VIRs. Each respective vector length register may be configured to store the length of the vector stored in the corresponding VIR. For example, the system 300 may include a vector length register (VLR) configured to store the length of the vector stored in the VIR. The VLR may be used in some operations that utilize the VIRs for address generation in vector operations.

[0086] In some embodiments, the sum of the output of the counter and the output of the alternate address candidate may be multiplexed with the output of the VIR and / or the counter (see, e.g., Figure 5 503). Alternatively, an alternate address candidate (e.g., an address component stored in VFR 503) may be used to set the initial value of the counter. In an alternate embodiment, the counter set by the alternate address candidate is a separate counter from the counter driving the VIR.

[0087] In some embodiments, a vector processor having one of systems 300, 400, or 500 may further include a vector load store unit configured to generate effective addresses for load and store operations of the vector processor. The vector load store unit may also be configured to, for each address component of the VIR, add the address component of the VIR to the effective address for accessing the corresponding location in the OVR. The effective addresses and values ​​in the VLR may be used by some vector operations to enhance the performance of the operation.

[0088] In some embodiments, a vector load store unit connected to one of the systems 300, 400, or 500 is configured to load an operand vector stored in an OVR and to load a scalar stored in a scalar register. This vector load store unit may also be configured to compare the elements of the loaded operand vector with the loaded scalar, and store the positions of the elements of the loaded operand vector in the VIR according to the comparison. For example, the vector load store unit may also be configured to store the positions of elements that match the scalar, to store the positions of elements that are greater than the scalar, or to store the positions of elements that are greater than or equal to the scalar. Also, for example, the vector load store unit may be configured to store the positions of elements that are even numbers, and not to store those elements that are odd numbers, or vice versa.

[0089] A vector load store unit connected to one of the systems 300, 400, or 500 may also be configured to load the stored locations of the elements of the loaded operand vector from the VIR. Also, the vector load store unit may be configured to iterate vector operations on the elements of the loaded operand vector according to the loaded locations stored in the VIR.

[0090] In some embodiments, the vector operation is a pack operation configured to store elements of the loaded operand vector into the output OVR corresponding to the loaded locations stored in the VIR.

[0091] In some embodiments, the vector load store unit may be configured to load the stored elements from the output OVR and then iterate the second vector operation on the stored elements from the output OVR according to the loaded positions stored in the VIR. The second vector operation may be an expansion operation configured to store the elements from the output OVR into the second output OVR at the position of the second output OVR according to the loaded positions stored in the VIR. The expansion operation may also be further configured to store a scalar into the second output OVR at other positions of the second output OVR.

[0092] In some embodiments, the vector load store unit may be configured to iterate a second compression operation on elements of the second loaded operand vector according to the loaded positions stored in the second VIR. In such embodiments, the vector load store unit may be configured to store the elements of the second loaded operand vector into a second output OVR corresponding to the loaded positions stored in the second VIR. Also, the vector load store unit may be configured to perform one or more vector operations using elements from the first output OVR and the second output OVR.

[0093] In some embodiments, the vector load store unit may be configured to perform one or more vector operations using elements from the first output OVR and / or the second output OVR and elements of a third operand vector stored in a third OVR, the third operand vector being accessed sequentially and not generated by indexing of the VIR. The results of the operations may be stored sequentially in a fourth OVR.

[0094] As mentioned, systems 300, 400, and 500 may be part of one or more vector processors. Systems 300, 400, and 500 may also be subsystems of a larger system of one or more vector processors.

[0095] For example, systems 300, 400, and 500 may be included in another system or connected to another system of one or more vector processors. This system may not be part of a vector processor.

[0096] Also disclosed herein is a system that may include an ALU of a plurality of ALUs. The system may also include an OVR of a plurality of operand vector registers (OVRs). The OVR may be configured to store elements of an operand vector to be used as inputs to vector operations of the ALU. The system may also include a VIR of a plurality of vector index registers (VIRs). The VIR may be configured to store a plurality of address components corresponding to a plurality of locations in the OVR. Each address component may be added to an effective address for accessing a corresponding location in the OVR. And, each location of the OVR may include an element of an operand vector to be operated by the ALU.

[0097] The system may also include a counter (or counter register). The counter may be configured to store a count. The count may at least be added to an effective address for accessing the OVR, or used to iterate over a plurality of address components stored in the VIR.

[0098] The system may also include an N:1 multiplexer. In other words, the system may include a multiplexer having multiple inputs and one output. The N:1 multiplexer may be configured to receive at least a count from a counter and an output from a VIR as inputs. The output from the VIR may include one of a plurality of address components of the VIR that corresponds to the count. The N:1 multiplexer may also be configured to receive a mode value as a select input, the mode value being at least a value for selecting the count or a value for selecting the output from the VIR. The N:1 multiplexer may also be configured to select the count or the output from the VIR based on at least the received mode value. The N:1 multiplexer may also be configured to output the selection and communicate it to a vector load storage unit that accesses the OVR for the ALU.

[0099] In some embodiments, the count may also be used to increment an address component of a scalar index register used to access the OVR. In such examples, the N:1 multiplexer may be further configured to receive as input at least the count from the counter, the output from the VIR, and the output from the scalar index register. The N:1 multiplexer may also be further configured to receive as a select input a mode value, the mode value being at least a value for selecting the count, a value for selecting the output from the VIR, or a value for selecting the output from the scalar index register. The N:1 multiplexer may also be further configured to select at least the count, the output from the VIR, or the output from the scalar index register based on the received mode value.

[0100] In some embodiments, the scalar index register may be a vector first register (VFR). The VFR may be configured to store a vector first address component. The vector first address component may be an address component that directs an initial access of the OVR at an initial location of the OVR based on the vector first address component so that the initial location accessed is not the first location of the OVR. The VFR may be used to initially access the OVR at any location of the OVR based on a value stored in the VFR.

[0101] In some embodiments, the count may also be used to iterate over multiple address components in a second VIR stored in the VIR. In such instances, the N:1 multiplexer may be further configured to receive at least a count from a counter, an output from a VIR, and an output from a second VIR as inputs. Moreover, the N:1 multiplexer may be further configured to receive a mode value as a selection input, the mode value being at least a value for selecting the count, a value for selecting the output from the VIR, or a value for selecting the output from the second VIR. Furthermore, the N:1 multiplexer may be configured to select at least a count, an output from the VIR, or an output from a second VIR based on the received mode value.

[0102] Figures 6 to 10In some embodiments, a vector load store unit, such as vector load store unit 210, may perform or facilitate, alone or in combination with other parts of a vector processor. Figures 6 to 10 In some embodiments, the storing, loading, determining, incrementing, and changing of values ​​described herein may be performed by a vector load store unit of a vector processor according to instructions stored in the vector load store unit. In some other embodiments, other portions of the vector processor may perform or facilitate Figures 6 to 10 The operations illustrated in and other operations described in this document.

[0103] In general, the systems described herein may implement a number of functions, including vector compression and expansion functions. For example, in a list of address components stored in a VIR (e.g., VMX), the elements of a given vector A may be compressed into a new vector by reading element A(VMX(i)) from vector A and storing it in an output vector B(i). Thus, vector A is compressed into B by B(i)=A(VMX(i)) (for i=0,1,...n). Similarly, expansion may be performed in the reverse direction (e.g., B(VMX(i))=A(i)). Additionally, one or more VIRs may allow a vector processor to directly perform sparse operations with or without compression and / or expansion. For example, VIR may implement indexing in B(i)=function(A(VMX(i)),C(VMX(i)), which may be a sparse operation with compression. Also, VIR may implement indexing in B(VMX(i))=function(A(VMX(i)),C(VMX(i)), which may be a sparse operation without compression. Also, VIR may implement indexing in B(VMX(i))=function(A(i),C(i)), which may be an operation on compressed vectors with expansion.

[0104] Figure 6 Example operations of method 600 for accessing elements of an operand vector for one or more vector operations are illustrated in accordance with some embodiments of the present disclosure.

[0105] exist Figure 6 , method 600 begins at step 602, where elements of an operand vector to be used as inputs to a vector operation of a plurality of arithmetic logic units (ALUs) in a vector processor are stored in an operand vector register (OVR) in a plurality of operand vector registers (OVRs) in the vector processor. Storing the elements of the operand vector in the OVR may occur at any time before they are used as inputs to the vector operation of the ALU. For example, step 602 may occur after step 618.

[0106] The method 600 continues at step 604 where a plurality of address components corresponding to a plurality of locations in the OVR are stored in a vector index register (VIR) of a plurality of vector index registers (VIRs) in the vector processor.

[0107] The method 600 continues at step 606, where an iteration is performed over a plurality of address components stored in the VIR according to a count (e.g., a count stored in a counter register) to provide an output. Subsequently, the vector load store unit adds the output from the VIR to the effective address for accessing the OVR. The output from the VIR may include one of the plurality of address components of the VIR that corresponds to the count. Each time the vector load store unit requests an output from the VIR for adding the output of the VIR to the effective address for accessing the OVR, a single iteration over the plurality of address components stored in the VIR according to the count may occur. This may occur repeatedly until the VIR has iterated through operations on the OVR.

[0108] The method 600 continues at step 608 where at least the count from the counter and the output from the VIR are received by an N:1 multiplexer of the vector processor, where the output from the VIR may include one of a plurality of address components of the VIR that corresponds to the count.

[0109] The method 600 continues at step 610 where a select input comprising a mode value is received by the N:1 multiplexer, the mode value being at least a value for selecting a count or a value for selecting an output from the VIR.

[0110] The method 600 continues at step 612 where at least a count or an output from the VIR is selected based on the received mode value by an N:1 multiplexer.

[0111] At step 614, the selection is communicated to a vector load store unit of the vector processor that accesses the OVR for the ALU.

[0112] The method 600 continues at step 616 where the count stored in the counter is added to the effective address for accessing the OVR.

[0113] The method 600 continues at step 618 where the address component of the VIR is added to the effective address for accessing the corresponding location in the OVR.Each location of the OVR may contain an element of an operand vector to be operated on by the ALU.

[0114] Method 600 continues at step 620 where the OVR for the ALU is accessed via the vector load store unit based on the effective address generated at step 616 or 618 .

[0115] Figure 71 illustrates example operations of a method 700 for compressing elements of an operand vector according to some embodiments of the present disclosure. Figure 7 , method 700 begins at step 702, where an input operand vector stored in an input OVR is loaded via a vector load store unit.

[0116] Method 700 continues at step 704 where the count stored in the counter register is loaded via a vector load store unit.

[0117] The method 700 continues at step 706 where the storage locations of the elements of the loaded input operand vector are loaded from the VIR according to the count by the vector load store unit.

[0118] Method 700 continues at step 708, where a vector compression operation is performed on the elements of the loaded input operand vector according to the load position from the VIR. Step 708 includes step 710, which includes method 700 continuing with the following operation: storing the elements of the loaded input operand vector into the output OVR corresponding to the load position from the VIR.

[0119] The method 700 continues at step 712, where the count is compared to a value representing the vector length of the VIR (i.e., VL) so that a vector compression operation can be iterated on the input OVR for each of the locations stored in the VIR. When the count is equal to the vector length of the VIR, the method 700 ends. When the count is less than the vector length of the VIR, then the method 700 continues at 714 by incrementing the count, and then returns to step 704 (loading the count stored in the counter register), followed by steps 706 (loading the stored locations of the elements of the loaded input operand vector from the VIR according to the count via the vector load storage unit) and 708 (running a vector compression operation on the elements of the loaded input operand vector according to the load locations from the VIR). In this way, the vector compression operation is iterated on the input OVR for each of the locations stored in the VIR.

[0120] Figure 8 An example system 800 is illustrated that includes a vector index register 802 (VIR 802) for compressing elements of an input operand vector stored in an input OVR 804, according to some embodiments of the present disclosure. The example system 800 is one example of a system that may implement at least the method 700.

[0121] exist Figure 8802 stores a list of locations of input OVR 804 (e.g., "2" as the first element of input OVR, and "4" as the second element of input OVR). In the illustrated example, the vector processor is shown running two cycles or iterations of a vector compression operation. At the first iteration, counter 806 outputs a count of "0", which is the value stored in the counter at the first cycle. In the first cycle, VIR 802 is shown as outputting "2". Multiplexer 808 selects between an address component ("0") as specified by counter 806 in normal mode operation or an address component ("2") as specified by VIR 802 in VIR operating mode (or in this particular example, compression operation mode). When VIR (or compression mode) is selected by multiplexer 808 in the first cycle, the output "2" from VIR 802 is the address component used to access input OVR 804. As a result, the input OVR 804 is accessed for the output of element "C" at position "2" of the input OVR. The output OVR 810 is directly addressed by the count stored in the counter 806. Since the count of the counter 806 is "0" in the first cycle, the output ORV 810 stores "C" as its first element. In the next iteration or cycle, the output ORV 810 stores "E" as the second element at position "1" of the output OVR. In this example showing two cycles, the input OVR 804 with elements {A, B, C, D, E} is compressed into the output OVR 810 with elements {C, E}.

[0122] Moreover, reference Figure 8 , if the address signals for the input / output vector are inverted, {C, E} may be expanded to a second output OVR having elements {x, x, C, x, E}, where x is an existing value before the compression operation or a scalar value selected from a scalar register (e.g., see Fig. 9 , which is an example method of extending a compressed vector with a scalar value from a scalar register).

[0123] Additionally, if the value from the VFR is added to the count of the counter, then summation can be used so that the first iteration of the operation on the input OVR occurs at another position of the input OVR than the first position of the input OVR (e.g., the first position of the input OVR 804 is marked as "0"). For example, see Figure 5 Alternatively, the VFR can be used to provide the input to the count register so that the count register is initialized to the value stored in the VFR at the start of a vector operation. This option allows vectors to be processed for the first time.

[0124] Fig. 9Example operations of a method 900 for expanding elements of an operand vector (eg, elements of a compressed operand vector) are illustrated in accordance with some embodiments of the present disclosure.

[0125] like Fig. 9 As shown, method 900 may start with method 700, which ends with outputting a compressed operand vector stored in an output OVR. Next, method 900 continues at step 902, where the stored elements are loaded from the output OVR by a vector load storage unit. The stored elements are elements of the compressed vector.

[0126] The method 900 continues at step 904 where a second vector operation is iterated on the stored elements from the output OVR according to the load position stored in the VIR. The second operation is a vector expansion operation. In other words, the second vector operation, which is a vector expansion operation, expands the compressed vector stored in the output OVR.

[0127] Method 900 continues at step 906 where, in accordance with the expansion operation, elements from the output OVR are stored into a second output OVR at locations of the second output OVR in accordance with the load locations stored in the VIR.

[0128] The method 900 continues at step 908, where a scalar is stored in the second output OVR at other locations of the second output OVR according to the expansion operation. The final output of the expansion operation after step 908 is an expanded vector having elements from the compressed vector and one or more instances of the scalar value at other locations of the expanded vector. The locations of the elements from the compressed vector in the expanded vector correspond to the load locations or address components stored in the VIR.

[0129] Fig.10 Example operations of method 1000 are illustrated with respect to operations on a plurality of compressed vectors in accordance with some embodiments of the present disclosure.

[0130] like Fig.10 As shown, method 1000 may begin with method 700, which ends with outputting a compressed operand vector stored in an output OVR. Furthermore, operations similar to method 700 are performed on a second operand vector. For example, method 1000 continues at step 1002, where a second compression operation is iterated on elements of the second loaded operand vector according to the load positions stored in the second VIR.

[0131] Method 1000 continues at step 1004 where elements of the second loaded operand vector are stored in a second output OVR corresponding to the load locations stored in the second VIR.

[0132] The method 1000 continues at step 1006 where one or more vector operations are performed using elements from the first output OVR and the second output OVR. The one or more vector operations use elements from two compressed vectors, which are elements from the first output OVR and the second output OVR.

[0133] As mentioned herein, at least some of the embodiments disclosed herein are vector index registers in a vector processor, each of which stores a plurality of addresses for accessing a plurality of locations in a vector. Additionally, at least some of the embodiments disclosed herein are vector index registers for TRUE and / or FALSE results of one or more comparisons (e.g., numerical comparisons), each of which stores a plurality of addresses for accessing a plurality of locations in an operand vector.

[0134] Also, as mentioned herein, it is known to use scalar index registers in vector processors to reference multiple positions of a vector by changing the value stored in the scalar index register during a vector operation. However, by using a vector index register (VIR) (e.g., a VIR for a TRUE result or a VIR for a FALSE result) to index multiple positions of one or more operand vectors, the scalar index register can be replaced, and continuous changes of the value in the scalar index register during vector operations using TRUE and / or FALSE results can be at least avoided.

[0135] As mentioned herein, there are many limitations associated with using scalar registers or single-entry vectors to index vectors. Also, some of these limitations may inhibit the performance of vector processors that use scalar index registers. By using vector index registers (e.g., VIRs for TRUE results or VIRs for FALSE results) to index multiple positions of one or more operand vectors used in vector comparison operations or other types of operations, scalar index registers may be replaced, and continuous changes of scalar index registers during vector operations may be at least avoided.

[0136] In some embodiments, when a vector of TRUE and FALSE elements (e.g., the contents of a vector mask Vm) is calculated, a system or circuit may generate an index vector to supplement or replace the vector. The index vector may be used for a TRUE result or a FALSE result or a combination thereof, and these types of index vectors may be stored in the corresponding vector index registers VIR_TRUE, VIR_FALSE, and VIR_COMBINED. VIR_COMBINED is a single VIR that includes a TRUE segment and a FALSE segment.

[0137] VIR_TRUE, VIR_FALSE and / or VIR_COMBINED may contain a vector mask (Vm) or an element in a corresponding OVR. Vm is a vector that stores the TRUE and FALSE results of a comparison of vectors (e.g., a numerical comparison of vectors). Vm can be used for conditional operations and compression and expansion operations. The vector register used for Vm can be replaced by VIR_TRUE, VIR_FALSE and / or VIR_COMBINED. And, when the vector processor performs vector operations, VIR_TRUE, VIR_FALSE and / or VIR_COMBINED can increase the performance of the vector processor in replacing Vm.

[0138] For example, a counter may be used to track the number of TRUE elements in the computation of Vm, starting with zero. When the i-th TRUE element is identified as the result of the j-th element of Vm, the index j is saved to the i-th element of the vector VmxT (and stored in VIR_TRUE). Similarly, a counter may be used to track FALSE results, and the index of the FALSE result is saved in the vector VmxF (and stored in VIR_FALSE). The sum of the vector lengths of VmxT and VmxF is equal to the vector length of Vm. A vector procedure may use Vi as a vector where the i-th element has a value of I to generate VmxT and VmxF, where VmxT = Compress(Vi, Vm) and VmxF = Compress(Vi,!Vm).

[0139] Compressed index or address vectors VmxT and / or VmxF stored or loaded in VIR_TRUE or VIR_FALSE may be used for conditional operations and / or for compression and expansion operations such as those described herein. Where a vector or address vector with compressed indices can be accessed, such operations may be operated directly on the vector without having to generate a compressed vector on an intermediate vector register such as a register for iterating through Vm.

[0140] As mentioned herein, there are many uses for VIR (eg, VIR_TRUE or VIR_FALSE). For example, VIR_TRUE or VIR_FALSE can be used to more efficiently implement vector compression or expansion functions.

[0141] Fig.11 Example operations of method 1100 are illustrated for constructing indexed vectors to store in vector index registers for TRUE and FALSE results (eg, "0" and "1" results) of comparisons in accordance with some embodiments of the present disclosure.

[0142] The method 1100 begins at step 1102 where an operand vector stored in an operand vector register (OVR) is loaded via a vector load store unit of a vector processor.

[0143] The method 1100 continues at step 1104 where a scalar stored in a scalar register of the vector processor is loaded via a vector load store unit.

[0144] The method 1100 continues at step 1106, wherein the elements of the loaded operand vector are compared with the loaded scalar according to the count stored in the counter by the vector processor. The counter may be another scalar register and may be part of the vector processor. Moreover, in some embodiments, the method 1100 may continue by comparing the elements of the loaded operand vector with another operand vector according to the count stored in the counter. In some embodiments, to perform the comparison, the elements of the loaded operand vector are accessed by the vector processor according to a first count in a first counter, and the elements of the other loaded operand vector are accessed by the vector processor according to a second count in a second counter. The comparison may be a numerical comparison.

[0145] Method 1100 continues at step 1108, where the result of the comparison of step 1106 is identified as TRUE or FALSE (e.g., "1" or "0"). If the result of the comparison in step 1106 is TRUE, then method 1100 continues at step 1110a, where the TRUE counter is counted according to the count (e.g., according to the count, via the TRUE count stored in the TRUE counter - see e.g., Fig.12 1216a) stores the position of the element of the loaded operand vector in the vector index register (VIR_TRUE) for the TRUE result of the comparison. If the result of the comparison of step 1106 is FALSE, then the method 1100 continues at step 1110b, where the FALSE count stored in the FALSE counter is counted according to the count (e.g., according to the count, via the FALSE count stored in the FALSE counter - see for example Fig.12 The FALSE counter 1216b depicted in FIG. 1 stores the position of the element of the loaded operand vector in the vector index register (VIR_FALSE) for the FALSE result of the comparison.

[0146] The method 1100 continues at step 1112, where it is identified whether the count is equal to the vector length (VL) of the operand vector stored in the OVR. In some embodiments, the method 1100 may continue, where it is identified whether the VL of the OVR is equal to the result of adding the VL of VIR_TRUE to the VL of VIR_FALSE, which may be another way to identify whether the count is equal to the VL of the operand vector stored in the OVR. These example alternatives for identifying whether the count is equal to the VL of the OVR may show all elements of the OVR being compared. If the count is less than the VL, the method continues at step 1114, where the count is incremented. By incrementing the count until the count is equal to the VL, the vector processor may continue with the following operation: storing the position of the element of the loaded operand vector according to the count until the position of the element of the loaded operand vector is stored in VIR_TRUE or VIR_FALSE. In other words, the method 1100 continues to store the position of the element of the loaded operand vector according to the count until the position of the element of the loaded operand vector is stored in VIR_TRUE or VIR_FALSE.

[0147] At step 1112, if the count is equal to VL, then the method 1100 has completed the construction of the indexed vector for storage in VIR_TRUE and VIR_FALSE. The count cannot be greater than VL because the operation of building the indexed vector is completed when the count is equal to VL. When a new indexed vector is constructed, the count is reset, and the VL register storing the scalar value of VL can also be reset. The vector processor can initially determine the vector length of the OVR and then store the length in the VL register before executing the method 1100.

[0148] After completing the construction of the indexed vector stored in VIR_TRUE and VIR_FALSE, the method 1100 continues at step 1116, where the storage location of the elements of the loaded operand vector is loaded from at least one of VIR_TRUE or VIR_FALSE or a combination thereof by the vector load storage unit. And, the method 1100 continues at step 1118, where one or more vector operations are iterated on the elements of the loaded operand vector according to the load location.

[0149] Fig.12 An example system 1200 is illustrated for constructing indexed vectors for storage in VIR_TRUE 1202a and VIR_FALSE 1202b according to some embodiments of the present disclosure. System 1200 may implement many operations and aspects of method 1100, and system 1200 may be part of one or more vector processors.

[0150] The system 1200 includes VIR_TRUE 1202a and VIR_FALSE 1202b, such as the VIR_TRUE and VIR_FALSE described in the description of the method 1100. The system also includes OVR 1204, such as the OVR described in the description of the method 1100.

[0151] System 1200 also includes a scalar register (SR) 1206, such as the scalar register described in the description of method 1100. In some embodiments, the scalar register may be replaced with another OVR that is addressed in the same manner as OVR 1204.

[0152] The system also includes a counter 1208 , which may be implemented in part by a counter register and may be the counter described in the description of method 1100 .

[0153] System 1200 also includes a comparator 1210 that can perform a comparison of a value stored in SR 1206 with a value stored in an element of OVR 1204. Comparator 1210 can perform a comparison, such as OVR(i)<SR,OVR(i)=SR,OVR(i)> SR, OVR(i)≤SR, or OVR(i)≥SR. Comparator 1210 compares two numbers once or per cycle. At each iteration i (which also represents the address or address component i), counter 1208 provides an address i for accessing OVR 1204 to be compared by comparator 1210 with a scalar value from SR 1206. In short, the output of OVR 1204 at iteration or address i is compared with the value from scalar register 1206. Comparator 1210 produces a single output, which is either TRUE or FALSE (e.g., "1" or "0").

[0154] The comparator 1210 may be configured to perform the comparison at step 1106 of the method 1100. In other words, the comparator 1210 may be configured to compare the elements of the loaded operand vector with the loaded scalar according to the count stored in the counter register. The comparator 1210 may also be configured to perform the identification of a TRUE or FALSE result at step 1108. In other words, the comparator 1210 may be configured to identify whether the result of the comparison of step 1106 is TRUE or FALSE. The comparator 1210 may be configured to output a TRUE or FALSE result, such as a "1" for a TRUE result or a "0" for a FALSE result. The output of the comparator 1210 is input into a corresponding write enable of each of the VIR_TRUE 1202a and VIR_FALSE 1202b.

[0155] The output from comparator 1210 may be communicated directly to write enable 1212a for VIR_TRUE 1202a. The output from comparator 1210 may be communicated indirectly to write enable 1212b for VIR_FALSE 1202b via inverter 1214. Inverter 1214 is configured to invert the output of comparator 1210 before it reaches write enable 1212b for VIR_FALSE 1202b. For example, if the output of comparator 1210 is TRUE (e.g., "1"), when the output is input into inverter 1214, the inverter inverts the value to FALSE (e.g., "0") and outputs FALSE.

[0156] The system 1200 also includes a separate TRUE counter 1216a for VIR_TRUE 1202a and a separate FALSE counter 1216b for VIR_FALSE 1202b. The output of the comparator 1210 drives the two counters, namely counters 1216a and 1216b. Counters 1216a and 1216b are separate from the counter 1208 that provides the address for the OVR 1204. The output of the TRUE counter 1216a is used as the address for accessing VIR_TRUE 1202a. The output of the FALSE counter 1216b is used as the address for accessing VIR_FALSE 1202b.

[0157] For example, when the output of comparator 1210 is TRUE, the output triggers write enable 1212a to write the current position from OVR 1204 into VIR_TRUE 1202a. When the output of comparator 1210 is FALSE, the output triggers write enable 1212b to write the current position from OVR 1204 into VIR_FALSE 1202b. This functionality is provided via a circuit including an inverter 1214 and two write enablers 1212a and 1212b.

[0158] The output of counter 1208 is used as the address or address component to be written into VIR_TRUE 1202a at the address specified by TRUE counter 1216a. This occurs when the output of comparator 1210 is TRUE. For each TRUE toggled output from comparator 1210, the value stored in counter TRUE 1216a is increased by one. The output of counter 1208 is used as the address or address component to be written into VIR_FALSE 1202b at the address specified by FALSE counter 1216b. This occurs when the output of comparator 1210 is FALSE. For each FALSE toggled output from comparator 1210, the value stored in FALSE counter 1216b is increased by one. This overall functionality of selecting where to store the address of the OVR component is provided by circuits including comparator 1210, write enablers 1212a and 1212b, inverter 1214, and TRUE counter 1216a and FALSE counter 1216b.

[0159] VIR_TRUE 1202a and VIR_FALSE 1202b are each output registers of system 1200. VIR_TRUE 1202a has three inputs. The first input comes from write enable 1212a. For example, an input TRUE from this first input allows writing into VIR_TRUE 1202a, and FALSE does not allow writing into the register. The second input comes from TRUE counter 1216a, which is used to access the address of VIR_TRUE 1202a. The third input comes from counter 1208, and this input contains data (or second input) written into VIR_TRUE 1202a at the address of the register provided by TRUE counter 1216a.

[0160] The system 1200 may be part of a vector processor that includes a vector load store unit. The vector load store unit may load data stored in registers of the system 1200 to main memory and store data from main memory to registers of the system, and vice versa (load data stored in memory to registers of the system 1200 and store data from registers of the system to memory).

[0161] System 1200 is also shown to include a scalar register for vector length: vector length register 1224 (VLR1224). VLR 1224 is configured to store the vector length (VL) of OVR 1204. The vector processor may load the VL from VLR 1224 into memory to identify whether the count from counter 1208 is equal to the VL of the operand vector stored in OVR 1204. This is, for example, to implement Fig.111202a or VIR_FALSE 1202b. In other words, the method 1200 may continue to store the positions of the elements of the OVR 1204 according to the count until the positions of the elements of the loaded operand vector are stored in VIR_TRUE 1202a or VIR_FALSE 1202b. This is one of the ways in which the system 1200 may implement the operation of the method 1100.

[0162] If the count is equal to VL, then the vector processor using system 1200 has completed construction of the indexed vector for storage in VIR_TRUE 1202a and VIR_FALSE 1202b. The count cannot be greater than VL because the operation of constructing the indexed vector is completed when the count is equal to VL. When a new indexed vector is constructed, the count is reset in counter 1208, and VL is determined and stored in VLR 1224. The vector processor may initially determine the vector length of the OVR (e.g., OVR 1204), and then store it in VLR 1224 before executing method 1100.

[0163] After completing the construction of the indexed vectors stored in VIR_TRUE 1202a and VIR_FALSE 1202b, the vector processor may continue to load the storage location of the elements of OVR 1204 from at least one of VIR_TRUE or VIR_FALSE or a combination thereof through the vector load storage unit of the processor. In addition, the vector processor may also continue to iterate one or more vector operations on the elements of OVR 1204 according to the load locations in VIR_TRUE 1202a and / or VIR_FALSE 1202b.

[0164] exist Fig.14An alternative to system 1200 is described in , where both VIR_TRUE and VIR_FALSE are essentially combined into one vector index register, where the TRUE addresses of the OVR are stored from the top of the register down, and the FALSE addresses of the OVR are stored from the bottom of the register up. In this alternative, the counter used to address the TRUE portion of the combined VIR starts at address "zero" and increments by one for each TRUE input into the combined register. The FALSE counter starts at "N-1" of the address used to access the combined VIR, and the counter decrements by one for each FALSE input into the combined register. Fig.14 The multiplexer shown in can be used to select from the counter for TRUE input or the counter for FALSE input. For each cycle, the VIR is enabled once for writing, because the input is to the TRUE segment (e.g., address 0, 1, 2, ..., count + 1, where the count starts at "0") or the FALSE segment of the VIR (e.g., address N-1, N-2, N-3, ..., VIR_length-count+1, where the count starts at "0"); and therefore, the index is generated from top to bottom or bottom to top.

[0165] Fig.13 Example operations of method 1300 are illustrated for constructing a combined indexing vector for storage in a combined vector index register for TRUE and FALSE results (eg, "1" or "0" results) for comparisons in accordance with some embodiments of the present disclosure.

[0166] The method 1300 begins at step 1302 where an operand vector stored in an OVR is loaded via a vector load store unit of a vector processor.

[0167] The method 1300 continues at step 1304 where a scalar stored in a scalar register of the vector processor is loaded via a vector load store unit.

[0168] The method 1300 continues at step 1306, wherein the elements of the loaded operand vector are compared with the loaded scalar according to the count stored in the counter by the vector processor. The counter may be another scalar register and may be part of the vector processor. Moreover, in some embodiments, the method 1300 may continue by comparing the elements of the loaded operand vector with another operand vector according to the count stored in the counter. In some embodiments, to perform the comparison, the elements of the loaded operand vector are accessed by the vector processor according to a first count in a first counter, and the elements of the other loaded operand vector are accessed by the vector processor according to a second count in a second counter. The comparison may be a numerical comparison.

[0169] Method 1300 continues at step 1308, where it is identified whether the result of the comparison in step 1306 is TRUE or FALSE (e.g., "1" or "0"). If the result of the comparison in step 1306 is TRUE, then method 1300 continues at step 1310a, where the TRUE counter is counted according to the count (e.g., according to the count, via the TRUE count stored in the TRUE counter - see e.g., Fig.14 1416a) stores the position of the element of the loaded operand vector at the topmost unfilled position in VIR_combined. If the result of the comparison in step 1306 is FALSE, then method 1300 continues at step 1310b, where the FALSE count stored in the FALSE counter is counted according to the count (e.g., according to the count, via the FALSE count stored in the FALSE counter - see for example Fig.14 The FALSE counter 1416b depicted in FIG. 14 stores the position of the element of the loaded operand vector at the bottommost unfilled position in VIR_combined.

[0170] The method 1300 continues at step 1312, where it is identified whether the count is equal to the vector length (VL) of the operand vector stored in OVR. In some embodiments, the method 1300 may continue, where it is identified whether the VL of OVR is equal to the result of adding the VL of the TRUE section of VIR_COMBINED and the VL of the FALSE section of VIR_COMBINED, which may be another way to identify whether the count is equal to the VL of the operand vector stored in OVR. These example alternative ways of identifying whether the count is equal to the VL of OVR may show comparing all elements of OVR. If the count is less than VL, then the method continues at step 1314, where the count is incremented. By incrementing the count until the count is equal to VL, the vector processor may continue with the following operations: storing the positions of the elements of the loaded operand vector according to the count until the positions of the elements of the loaded operand vector are stored in VIR_combined. In other words, the method 1300 continues to store the positions of the elements of the loaded operand vector according to the count until the positions of the elements of the loaded operand vector are stored in VIR_combined.

[0171] At step 1312, if count is equal to VL, then method 1300 has completed construction of the indexed vector for storage in VIR_combined. Count cannot be greater than VL because the operation of constructing the indexed vector is completed when count is equal to VL. When a new indexed vector is constructed, count is reset, and the VL register storing the scalar value of VL may also be reset. The vector processor may initially determine the vector length of the OVR and then store the length in the VL register before executing method 1300.

[0172] After completing the construction of the indexed vector stored in VIR_combined, the method 1300 continues at step 1316, where the storage locations of the elements of the loaded operand vector are loaded from VIR_combined by the vector load storage unit. And, the method 1300 continues at step 1318, where one or more vector operations are iterated on the elements of the loaded operand vector according to the load location.

[0173] Fig.14 An example system 1400 for constructing a combined indexing vector for storage in VIR_combined 1402 is illustrated in accordance with some embodiments of the present disclosure.

[0174] The system 1400 includes a VIR_combined 1402, such as the VIR_combined 1402 described in the description of the method 1300. The system also includes an OVR 1404, such as the OVR described in the description of the method 1400.

[0175] System 1400 also includes a scalar register (SR) 1406, such as the scalar register described in the description of method 1300. In some embodiments, the scalar register may be replaced with another OVR that is addressed in the same manner as OVR 1404.

[0176] The system also includes a counter 1408 , which may be implemented in part by a counter register and may be the counter described in the description of method 1300 .

[0177] System 1400 also includes a comparator 1410 that can perform a comparison of a value stored in SR 1406 with a value stored in an element of OVR 1404. Comparator 1410 can perform a comparison, such as OVR(i)<SR,OVR(i)=SR,OVR(i)> SR, OVR(i)≤SR, or OVR(i)≥SR. Comparator 1410 compares two numbers once or per cycle. At each iteration i (which also represents the address or address component i), counter 1408 provides an address i for accessing OVR 1404 to be compared by comparator 1410 with a scalar value from SR 1406. In short, the output of OVR 1404 at iteration or address i is compared with the value from scalar register 1406. Comparator 1410 produces a single output, which is either TRUE or FALSE.

[0178] The comparator 1410 may be configured to perform the comparison at step 1306 of the method 1300. In other words, the comparator 1410 may be configured to compare the elements of the loaded operand vector with the loaded scalar according to the count stored in the counter register. The comparator 1410 may also be configured to perform the identification of a TRUE or FALSE result at step 1308. In other words, the comparator 1410 may be configured to identify whether the result of the comparison of step 1306 is TRUE or FALSE. The comparator 1410 may be configured to output a TRUE or FALSE result, such as a "1" for a TRUE result or a "0" for a FALSE result. The output of the comparator 1410 is input into one of the corresponding write enablers of the TRUE section and the FALSE section of VIR_COMBINED 1402.

[0179] The system 1400 also includes a separate TRUE counter 1416a for addressing the TRUE section of VIR_COMBINED 1402 and a separate FALSE counter 1416b for addressing the FALSE section of VIR_COMBINED. The output of the comparator 1410 drives two counters, namely counters 1416a and 1416b. Counters 1416a and 1416b are separate from the counter 1408 that provides addresses for OVR 1404. The output of the counter TRUE 1416a is used as the address for accessing VIR_COMBINED 1402 from top to bottom. The output of the FALSE counter 1416b is also used as the address for accessing VIR_COMBINED 1402 but from bottom to top. Further explanation of how the counter addresses VIR_COMBINED 1402 is discussed below.

[0180] The output of counter 1408 is used as the address or address component to be written into the TRUE section at the address specified by TRUE counter 1416a. This occurs when the output of comparator 1410 is TRUE. For each TRUE triggered output from comparator 1410, the value stored in TRUE counter 1416a increases by one. The output of counter 1408 is used as the address or address component to be written into the FALSE section at the address specified by FALSE counter 1416b. This occurs when the output of comparator 1410 is FALSE. For each FALSE triggered output from comparator 1410, the value stored in FALSE counter 1416b decreases by one. This overall functionality of selecting where to store the address of the OVR component is provided by a circuit comprising comparator 1410, TRUE counter 1416a and FALSE counter 1416b, and multiplexer 1420. The output from comparator 1410 controls multiplexer 1420 via select register 1422.

[0181] The multiplexer 1420 controls which counter output of the VIR_COMBINED 1402 the receive counters 1416a and 1416b provide. The control is via the selection of counter 1416a or 1416b, and the selection is controlled via a mode value stored in the selection register 1422. The selection register 1422 receives the mode value from the output of the comparator 1410. For each cycle, the VIR_COMBINED 1402 is enabled for writing once because the input is to the TRUE section of the VIR (e.g., addresses 0, 1, 2, …, count + 1, where the count starts at “0”) or the FALSE section of the VIR (e.g., addresses N - 1, N - 2, N - 3, …, VIR_length - count + 1, where the count starts at “0”); and thus, the index is generated top - down or bottom - up. In Fig.14 the example shown, the TRUE counter 1416a starts at “0” and increments by “1” for each cycle. In this example, the FALSE counter 1416b starts at a scalar value representing the length of the VIR_COMBINED 1402 (i.e., N - 1) and decrements by “1” for each cycle. For example, in Fig.14 , the comparison of the comparator 1410 is SR < OVR(i), and thus, the value “2” at address “0” of the OVR 1404 is TRUE, and thus the address “0” of the OVR is stored at address “0” of the VIR_COMBINED 1402 (or the top of the VIR). Also, the value “5” at address “1” of the OVR 1404 is FALSE, and thus the address “1” of the OVR is stored at address “N - 1” of the VIR_COMBINED 1402 (or the bottom of the VIR). Also, the value “3” at address “2” of the OVR 1404 is TRUE, and thus the address “2” of the OVR is stored at address “1” of the VIR_COMBINED 1402 (or the top - most position of the unfilled VIR). Also, the value “6” at address “3” of the OVR 1404 is FALSE, and thus the address “3” of the OVR is stored at address “N - 2” of the VIR_COMBINED 1042 (or the bottom - most position of the unfilled VIR).

[0182] The TRUE section and the FALSE section are each part of an output register of the system 1400. VIR_COMBINED 1402 has at least two inputs. The first input comes from counter 1416a or 1416b, which is used to access the address of VIR_COMBINED 1402. The second input comes from counter 1408, and this input contains the data written into VIR_COMBINED 1402 at the address of the register provided by counter 1416a or 1416b.

[0183] The system 1400 may be part of a vector processor that includes a vector load store unit. The vector load store unit may load data stored in registers of the system 1400 to main memory and store data from main memory to registers of the system, and vice versa (load data stored in memory to registers of the system 1400 and store data from registers of the system to memory).

[0184] System 1400 is also shown to include a scalar register for vector length: vector length register 1424 (VLR 1424). VLR 1424 is configured to store the vector length (VL) of OVR 1404. The vector processor may load the VL from VLR 1424 into memory to identify whether the count from counter 1408 is equal to the VL of the operand vector stored in OVR 1404. This is, for example, to implement Fig.13 1402. The system 1400 may continue to store the positions of the elements of the OVR 1404 according to the count until the positions of the elements of the OVR are stored in the TRUE section or the FALSE section of VIR_COMBINED 1402. In other words, the system 1400 may continue to store the positions of the elements of the OVR 1404 according to the count until the positions of the elements of the loaded operand vector are stored in the TRUE section or the FALSE section of VIR_COMBINED 1402. This is one of the ways in which the system 1400 may implement the operation of the method 1300.

[0185] If the count is equal to VL, then the vector processor using system 1400 has completed construction of an indexed vector for storage in the TRUE section or FALSE section of VIR_COMBINED 1402. The count cannot be greater than VL because the operation of constructing an indexed vector is completed when the count is equal to VL. When a new indexed vector is constructed, the count is reset in counter 1408, and VL is determined and stored in VLR 1424. The vector processor may initially determine the vector length of an OVR (e.g., OVR 1404), and then store it in VLR 1424 before executing method 1300.

[0186] After completing the construction of the indexed vector stored in VIR_COMBINED 1402, the vector processor may continue to load the storage location of the elements of OVR 1404 from VIR_COMBINED through the vector load storage unit of the processor. In addition, the vector processor may continue to iterate one or more vector operations on the elements of OVR 1404 according to the load location in VIR_COMBINED 1402.

[0187] Fig.15 An example system 1500 including VIR_TRUE 1502a and VIR_FALSE 1502b is illustrated according to some embodiments of the present disclosure. For purposes of the present disclosure, it should be understood that a system similar to system 1500 may include multiple VIR_TRUEs and multiple VIR_FALEs. For example, an embodiment similar to system 1500 having two VIR_TRUEs and two VIR_FALSEs may include a 5:1 multiplexer with four inputs to receive two VIR_TRUEs and two VIR_FALSEs and one input to receive an input from a counter (e.g., a counter similar to counter 1504). In some embodiments, the amount of VIR_TRUEs is equal to the amount of VIR_FALEs in such a system.

[0188] System 1500 may be a vector processor 102 (eg, see Figure 1 or 2) or more vector processors. System 1500 includes vector index registers VIR_TRUE 1502a and VIR_FALSE 1502b, a counter register 1504, a 2:1 multiplexer 1506, and a select register 1508 connected to the multiplexer. VIR_TRUE 1502a and VIR_FALSE 1502b can be Figure 2 The counter register 1504 and the select register 1508 may be registers in the scalar register 204. The 2:1 multiplexer 1506 may be Figure 2 bus 206 shown in or Figure 1 A portion of bus 104 is shown in FIG.

[0189] VIR_TRUE 1502a is a vector index register for a TRUE result for comparison and is configured to store a plurality of address components corresponding to a plurality of locations in the OVR that produce a TRUE result when used in a comparison. See, for example, VIR_TRUE 1202a which may be part of system 1500.

[0190] VIR_FALSE 1502b is a vector index register for FALSE results for comparison and is configured to store multiple address components corresponding to multiple locations in the OVR that produce a FALSE result when used for comparison. See, for example, VIR_FALSE 1202b, which may be part of system 1500.

[0191] Each address component may be added to the effective address for accessing the corresponding location in the OVR. Each location of the OVR may include an element of an operand vector to be operated by the ALU. For example, the system 1500 may be part of a vector processor including a plurality of arithmetic logic units (ALUs). The vector processor may also include a plurality of operand vector registers (OVRs). The OVRs may be configured to store elements of an operand vector to be used as inputs to vector operations of the ALUs.

[0192] As shown, counter register 1504 is part of system 1500. Counter register 1504 may also be part of a vector processor with system 1500. Counter register 1504 may be configured to store count 1510. Count 1510 may be added to the effective address used to access the OVR, or the count may be used by the vector processor to iterate over multiple address components stored in VIR 1502.

[0193] As shown, a 3:1 multiplexer 1506 is part of the system 1500. The 3:1 multiplexer 1506 may also be part of a vector processor having the system 1500. The 3:1 multiplexer 1506 may be configured to receive as inputs a count 1510 from the counter register 1504 and respective outputs 1512a and 1512b from the VIRs 1502a and 1502b. The outputs 1512a and 1512b from the VIRs 1502a and 1502b may each include one of the plurality of address components of the VIR that corresponds to the count 1510. The 3:1 multiplexer 1506 may also be configured to receive as a select input a mode value 1514. The mode value 1514 may be or include a value for selecting the count 1510, or a value for selecting one of the outputs 1512a or 1512b from the VIRs 1502a and 1502b. The 3:1 multiplexer 1506 may also be configured to select the count 1510 or one of the outputs 1512a or 1512b from the VIRs 1502a and 1502b based on the received mode value 1514. The 3:1 multiplexer 1506 may also be configured to receive the count 1510 and the outputs 1512a or 1512b from the VIRs 1502a and 1502b via a bus (e.g., Figure 1 1514. The select output 1516 may be communicated to a requestor that accesses the OVR for the ALU. The requestor may be a vector load storage unit of a vector processor (e.g., see Figure 2 ) or a vector load-store unit of another vector processor.

[0194] Fig.16 The example operation of the method 1600 for compressing elements of an operand vector according to VIR_TRUE (e.g., see VIR_TRUE 1202a or 1502a) according to some embodiments of the present disclosure is illustrated. Alternatively, according to some embodiments of the present disclosure, the example operation of the method 1600 for compressing elements of an operand vector may be according to a TRUE segment or a FALSE segment of VIR_FALSE (e.g., see VIR_FALSE 1202b or 1502b) or VIR_COMBINED (e.g., see VIR_COMBINED 1402).

[0195] exist Fig.16, method 1600 starts at step 1602, where an input operand vector stored in an input OVR is loaded by a vector load storage unit. Method 1600 continues at step 1604, where a count stored in a counter register is loaded by a vector load storage unit. Method 1600 continues at step 1606, where a storage location of an element of the loaded input operand vector is loaded from VIR_TRUE according to the count by a vector load storage unit. Method 1600 continues at step 1608, where a vector compression operation is performed on the elements of the loaded input operand vector according to the load location from VIR_TRUE. Step 1608 includes step 1610, which includes method 1600 continuing with the following operation: storing the elements of the loaded input operand vector into the output OVR corresponding to the load location from VIR_TRUE. The method 1600 continues at step 1612, where the count is compared to a value representing the vector length of VIR (i.e., VL) so that a vector compression operation can be iterated on the input OVR for each of the locations stored in VIR_TRUE. When the count is equal to the vector length of VIR_TRUE, then the method 1600 ends. When the count is less than the vector length of VIR_TRUE, then the method 1600 continues at 1614 by incrementing the count, and then returns to step 1604 (loading the count stored in the counter register), followed by steps 1606 (loading the stored locations of the elements of the loaded input operand vector from VIR_TRUE according to the count via the vector load storage unit) and 1608 (running a vector compression operation on the elements of the loaded input operand vector according to the load locations from VIR_TRUE). In this way, the vector compression operation is iterated on the input OVR for each of the locations stored in VIR_TRUE.

[0196] Fig.17 An example system 1700 is illustrated that includes VIR_TRUE 1702a (which may be similar to VIR_TRUE 1202a or 1502a) for compressing elements of an input operand vector stored in input OVR 1704 according to some embodiments of the present disclosure. Alternatively, the example system 1700 may be used to compress elements of an operand vector according to VIR_FALSE 1702b (which may be similar to VIR_FALSE 1202b or 1502b) according to some embodiments of the present disclosure. Moreover, the example system 1700 may be used to compress elements of an operand vector according to a TRUE segment or a FALSE segment of VIR_COMBINED (e.g., see VIR_COMBINED 1402) according to some embodiments of the present disclosure.

[0197] Example system 1700 is an example of a system that can implement at least method 1600 .

[0198] exist Fig.17 , VIR_TRUE 1702a stores a list of locations of input OVR 1704 (e.g., "2" as the first element of input OVR, and "4" as the second element of input OVR). In the illustrated example, the vector processor is shown running two cycles or iterations of the vector compression operation. At the first iteration, counter 1706 outputs a count of "0", which is the value stored in the counter at the first cycle. In the first cycle, VIR_TRUE 1702a is shown as outputting "2". Multiplexer 1708 selects between the address component ("0") as specified by counter 1706 operating in normal mode or the address component ("2") as specified by VIR_TRUE 1702a in VIR_TRUE operating mode (or compression operation mode, based on the contents of VIR_TRUE 1702a in this particular example). When VIR_TRUE (or VIR_TRUE compression mode) is selected by multiplexer 1708 in the first loop, output "2" from VIR_TRUE 1702a is the address component used to access input OVR 1704. As a result, the output accesses input OVR 1704 for element "C" at position "2" of the input OVR. Output OVR 1710 is directly addressed by the count stored in counter 1706. Since the count of counter 1706 is "0" in the first loop, output ORV 1710 stores "C" as its first element. In the next iteration or loop, output ORV 1710 stores "E" as the second element at position "1" of the output OVR. In this example showing two loops, input OVR 1704 having elements {A, B, C, D, E} is compressed into output OVR 1710 having elements {C, E}.

[0199] Moreover, reference Fig.17 , if the address signals for the input / output vector are inverted, {C, E} may be expanded to a second output OVR having elements {x, x, C, x, E}, where x is an existing value before the compression operation or a scalar value selected from a scalar register (e.g., see Fig. 9 , which is an example method of extending a compressed vector with a scalar value from a scalar register).

[0200] Additionally, if the value from the VFR is added to the count of the counter, then summation can be used so that the first iteration of the operation on the input OVR occurs at another position of the input OVR than the first position of the input OVR (e.g., the first position of the input OVR 1704 is marked as "0"). For example, see Figure 5. Alternatively, VIR_TRUE 1702a may be used to provide an input to a count register such that the initial value of the count register at the start of a vector operation is the value stored in VIR_TRUE 1702a. Such an option allows for initial processing of vectors. It should be appreciated that VIR_FALSE 1702b may be used in place of VIR_TRUE 1702a for different types of operations. For example, a compression operation may be based on VIR_FALSE 1702b instead of an index in VIR_TRUE 1702a. Also, VIR_COMBINED may replace both VIR_TRUE 1702a and VIR_FALSE 1702b in system 1700.

[0201] As mentioned herein, at least some of the embodiments disclosed herein are vector index registers in a vector processor, each storing multiple addresses (also referred to as indexes) for accessing multiple locations in a vector in the vector register. In addition, at least some of the embodiments disclosed herein are vector index registers (VIR_TRUE and VIR_FALSE) for TRUE and / or FALSE results of one or more conditional test operations (e.g., numerical comparisons), each storing multiple addresses for accessing multiple locations in an operand vector. Moreover, at least some of the embodiments described herein relate to conditional operations in a vector processor having vector index registers VIR_TRUE and VIR_FALSE. In addition, disclosed herein is the use of VIR_TRUE and VIR_FALSE to more efficiently and faster process vector conditional operations in a vector processor.

[0202] The techniques disclosed herein may provide at least support for basic or complex conditional operations. For example, the techniques may support the following basic conditional operation; if (A(i)>B(i)), then A(i)=A(i)+B(i), otherwise A(i)=A(i)-B(i). In this basic conditional operation, a single set of VIR, VIR_TRUE, and VIR_FALSE may be used to more efficiently perform the same operation via a vector processor that runs A(VIR_TRUE(j))=A(VIR_TRUE(j))+B(VIR_TRUE(j)) and A(VIR_FALSE(k))=A(VIR_FALSE(k))-B(VIR_FALSE(k)). Furthermore, disclosed herein is a system that can support the use of a pair of VIR_TRUE and VIR_FALSE to efficiently implement conditional operations in a vector processor, wherein the conditional operations include, for example, the following conditional operations: if ('test condition'), A(i)=A(i)+B(i), otherwise A(i)=A(i)-B(i).

[0203] The result of the test condition can also be used to set the index in the two vector index registers VIR_TRUE and VIR_FALSE.

[0204] The test condition can be simple (e.g., "A(i)>0", or "A(i)>B(i)", or "A(i)>C(i)"). The test condition can also be more complex (e.g., "(A(i)>0 and A(i)>B(i)) or (A(i)>C(i))"). Therefore, regardless of whether the test condition is simple or complex, a single set of VIR_TRUE and VIR_FALSE can be used to process two or more operation branches selected via conditional test operations (e.g., two operation branches include: then "A(i)=A(i)+B(i)", otherwise "A(i)=A(i)-B(i)").

[0205] For purposes of this disclosure, it should be understood that a conditional test generally need not be a test for “>”. The test condition may be other types of numerical tests and / or Boolean operations.

[0206] In some embodiments, when there are complex tests and / or Boolean operations, it may be advantageous to use the Vm register to track vector True and False values ​​so that different TRUE and FALSE vectors can be combined to produce the final test result. Converting complex Boolean operations into corresponding indexing operations such as VIR_TRUE and VIR_FALSE can be complex, so in some embodiments, using Vm as an intermediate indexing vector can be useful.

[0207] Some example embodiments may include a system including a vector processor, a plurality of operand vector registers (OVRs), a vector load storage unit, and at least two vector index registers (e.g., VIR_TRUE and VIR_FALSE). The vector processor may be configured to perform a conditional test operation on elements of a first loaded operand vector and a second loaded operand vector according to a count stored in a counter register of the vector processor.

[0208] The OVR may include a first operand vector register (OVR) of the vector processor configured to store a first operand vector and a second OVR of the vector processor configured to store a second operand vector.

[0209] The vector load store unit of the vector processor may be configured to load a first operand vector stored in a first OVR and load a second operand vector stored in a second OVR. In such examples, the vector processor may be configured to perform a conditional test operation on each element of the first operand vector and the second operand vector according to the count stored in the counter register. Moreover, in such examples, the conditional test operation may provide a test result vector.

[0210] The vector load storage unit of the vector processor may also be configured to store the position of the TRUE result in the first vector index register (VIR_TRUE) for each TRUE result in the conditional test operation in the test result vector. And, the vector load storage unit of the vector processor may also be configured to store the position of the FALSE result in the second vector index register (VIR_FALSE) for each FALSE result in the conditional test operation in the test result vector. In such an example, the vector processor may be configured to perform a first vector operation on a first element in the first operand vector and the second operand vector, the first element being identified by a position stored in the first vector index register (VIR_TRUE). The vector processor may also be configured to perform a second vector operation on a second element in the first operand vector and the second operand vector, the second element being identified by a position stored in the second vector index register (VIR_FALSE). In some embodiments, the vector processor uses instructions (e.g., user-level programmable instructions) that use registers to perform the vector operations described herein.

[0211] In some embodiments of the example system, the first operand vector is a first input operand vector, and the second operand vector is a second input operand vector. Also, in such embodiments, the vector load store unit may be configured to load the second count from the second counter register according to the second count, and load the storage locations of the corresponding elements of the loaded first input operand vector and the second input operand vector from VIR_TRUE. In such embodiments, the vector processor may be configured to run the first operation on the corresponding elements of the loaded first input operand vector and the second input operand vector according to the load location from VIR_TRUE. Also, the vector load store unit may be configured to store the result of the first operation in the output OVR at a location corresponding to the load location from VIR_TRUE. In addition, the vector processor may be configured to continue to run the first operation on corresponding elements of the loaded first input operand vector and the second input operand vector according to the load position from VIR_TRUE, and store the results of the first operation in the output OVR at corresponding positions matching the load position from VIR_TRUE until a second count equals the length of VIR_TRUE, wherein the count is incremented for each load position from VIR_TRUE. And, the vector processor may be configured to reset the second count when the second count equals the length of VIR_TRUE.

[0212] In some embodiments of the just mentioned example system, after the second count is reset by the vector processor, the vector load storage unit may be configured to load the storage location of the corresponding elements of the loaded first input operand vector and the second input operand vector from VIR_FALSE according to the second count. Moreover, the vector processor may be configured to run the second operation on the corresponding elements of the loaded first input operand vector and the second input operand vector according to the loading position from VIR_FALSE. In addition, the vector processor may be configured to continue to run the second operation on the corresponding elements of the loaded first input operand vector and the second input operand vector according to the loading position from VIR_FALSE, and store the result of the second operation in the output OVR at the corresponding position matching the loading position from VIR_FALSE until the second count equals the length of VIR_FALSE. The count may be incremented for each loading position from VIR_FALSE. In some examples, the first operation may include addition, and the second operation may include subtraction.

[0213] Alternatively, in some embodiments, VIR_TRUE and VIR_FALSE are part of a combined vector index register (VIR_combined). In such alternative embodiments, the vector load store unit may be configured to store the location of the TRUE result in the test result vector at the topmost unfilled location in VIR_combined for each TRUE result of the conditional test operation. Furthermore, the vector load store unit may also be configured to store the location of the FALSE result in the test result vector at the bottommost unfilled location in VIR_combined for each FALSE result of the conditional test operation.

[0214] In some embodiments described herein, a vector processor may include an arithmetic logic unit (ALU) in addition to an OVR, a vector load store unit, and VIRs such as VIR_TRUE and VIR_FALSE. In such embodiments, the OVR may include a first OVR and a second OVR. Each OVR may be configured to store elements of an operand vector to be used as input to a vector operation of the ALU. Furthermore, the vector processor may be configured to perform a conditional test operation on each element of the first OVR and the second OVR according to a count stored in a counter register. In this example, the conditional test operation may also provide a test result vector.

[0215] In such embodiments, a first vector index register (VIR_TRUE) may be configured to store the location of a TRUE result in a test result vector for each TRUE result of a conditional test operation. And, a second vector index register (VIR_FALSE) may be configured to store the location of a FALSE result in a test result vector for each FALSE result of a conditional test operation. Each of the locations may be added to an effective address for accessing a corresponding location in an OVR, and each of the corresponding locations of the OVR may include an element of an operand vector to be operated by the ALU. Also, in such embodiments, the first operand vector may be a first input operand vector, and the second operand vector may be a second input operand vector; and the vector processor may be configured to, for example, load a second count from a second counter register; load the storage locations of the corresponding elements of the loaded first input operand vector and the second input operand vector from VIR_TRUE according to the second count; and load the storage locations of the corresponding elements of the loaded first input operand vector and the second input operand vector from VIR_FALSE according to the second count.

[0216] Additionally, in such and other embodiments, the vector processor may be configured to run a first operation on corresponding elements of the loaded first and second input operand vectors in parallel according to the load location from VIR_TRUE, and store the results of the first operation in the output OVR at corresponding locations that match the load location from VIR_TRUE. Also, the vector processor may be configured to run a second operation on corresponding elements of the loaded first and second input operand vectors in parallel according to the load location from VIR_FALSE, and store the results of the second operation in the output OVR at corresponding locations that match the load location from VIR_FALSE. Also, for example, the first operation may include addition, and the second operation may include subtraction.

[0217] Furthermore, in some embodiments, the vector processor may be configured to run a first operation on corresponding elements of the loaded first and second input operand vectors in parallel according to the load location from VIR_TRUE, and store the result of the first operation in the output OVR for VIR_TRUE. Furthermore, in such embodiments, the vector processor may be configured to run a second operation on corresponding elements of the loaded first and second input operand vectors in parallel according to the load location from VIR_FALSE, and store the result of the second operation in the output OVR for VIR_FALSE. Fig.18 Illustrate example operations of method 1800 for constructing indexed vectors to store in vector index registers (VIR_TRUE and VIR_FALSE) for TRUE and FALSE results (e.g., "0" and "1" results) for conditional test operations in accordance with some embodiments of the present disclosure.

[0218] The method 1800 begins at step 1802, where one or more operand vectors are loaded via a vector load store unit of a vector processor. Each operand vector is stored in a corresponding operand vector register (OVR).

[0219] The method 1800 continues at step 1804, where a conditional test operation is performed, by the vector processor, on an element of at least one of the loaded one or more operand vectors based on a count stored in a counter. Also, in some embodiments, a conditional test operation may be performed with a scalar from a scalar register and an element of at least one of the loaded one or more operand vectors based on a count stored in a counter. The counter may be a scalar register and may be part of the vector processor. In some embodiments, the method 1800 at step 1804 includes performing, by the vector processor, a conditional test operation on an element of at least one of the loaded one or more operand vectors based on a count stored in a counter (e.g., see Fig.19Method 1900 in (a) compares corresponding elements of two different loaded operand vectors. In some embodiments, to perform a conditional test operation, elements of a first loaded operand vector are accessed by the vector processor based on a first count in a first counter, and elements of a second loaded operand vector are accessed by the vector processor based on a second count in a second counter.

[0220] The method 1800 continues at step 1806, where it is identified by the vector processor whether the result of the conditional test operation is a TRUE result. In other words, the method 1800 continues at step 1806, where it is identified whether the result of the conditional test operation of step 1804 is TRUE or FALSE (e.g., Boolean "1" or "0"). If the result of the operation in step 1804 is TRUE, then the method 1800 continues at step 1808, where the TRUE counter is counted according to the count (e.g., according to the count, via the TRUE count stored in the TRUE counter - see for example Fig. 20 2016a) stores the position of the element of the loaded operand vector in the vector index register (VIR_TRUE) for the TRUE result of the conditional test operation. If the result of the test operation of step 1804 is FALSE, then method 1800 continues at step 1810, where the FALSE count stored in the FALSE counter is counted according to the count (e.g., according to the count, via the FALSE count stored in the FALSE counter - see for example Fig. 20 The FALSE counter 2016b depicted in FIG. 2 stores the position of the element of the loaded operand vector in the vector index register (VIR_FALSE) for the FALSE result of the comparison.

[0221] The method 1800 continues at step 1812, where it is identified whether the count is equal to the vector length (VL) of at least one of the operand vectors. In some embodiments, the method 1800 may continue, where it is identified whether the VL of the OVR accessed by the conditional test operation is equal to the result of adding the VL of VIR_TRUE and the VL of VIR_FALSE, which may be another way to identify whether the count is equal to the VL of the operand vector stored in the OVR. These example alternatives for identifying whether the count is equal to the VL of at least one of the operand vectors may show that all elements of the OVR accessed by the test operation are used in the conditional test operation. If the count is less than the VL, then the method continues at step 1814, where the count is incremented. By incrementing the count until the count is equal to the VL, the vector processor may continue with the following operation: storing the position of the element of the loaded operand vector according to the count until the position of the element of the loaded operand vector is stored in VIR_TRUE or VIR_FALSE. In other words, the method 1800 continues to store the positions of the elements of the loaded operand vector according to the count until the positions of the elements of the loaded operand vector are stored in VIR_TRUE or VIR_FALSE.

[0222] At step 1812, if the count is equal to VL, then the method 1800 has completed the construction of the indexed vector for storage in VIR_TRUE and VIR_FALSE. After completing the construction of the indexed vector stored in VIR_TRUE and VIR_FALSE, the method 1800 continues at step 1816, wherein the storage location of the elements of the loaded operand vector is loaded from at least one of VIR_TRUE or VIR_FALSE or a combination thereof by the vector load storage unit. And, the method 1100 continues at step 1818, wherein one or more vector operations are iterated on the elements of the loaded operand vector according to the load location stored in VIR_TRUE and / or VIR_FALSE. In some embodiments, the number of iterations of step 1818 is equal to VL (as shown in step 1812). In such embodiments, two corresponding registers may be loaded with the new vector lengths of VIR_TRUE and VIR_FALSE (e.g., VL_VIR_TRUE and VL_VIR_FALSE). In other words, one VL register for the number of entries is stored in VIR_TRUE, and one register for the number of entries is stored in VIR_FALSE. In such embodiments, the corresponding VL register may also be loaded with the vector length of the OVR. Thus, in such embodiments, in step 1818, when the method 1100 continues to iterate one or more vector operations on the elements of the loaded operand vector according to the loaded positions stored in VIR_TRUE and / or VIR_FALSE, the vector processor may determine the number of iterations of OVR and / or VIR according to the corresponding VL values ​​of OVR and / or VIR in the corresponding VL registers.

[0223] In other words, the method disclosed herein may include loading one or more operand vectors by a vector load storage unit of a vector processor, each vector of the one or more operand vectors being stored in a corresponding operand vector register. Such a method may also include performing a conditional test operation on each element of at least one of the loaded one or more operand vectors according to a count stored in a counter register by the vector processor, the conditional test operation providing a test result vector. The method may also include: storing the position of the TRUE result in the test result vector in a first vector index register (VIR_TRUE) for each TRUE result of the conditional test operation; and storing the position of the FALSE result in the test result vector in a second vector index register (VIR_FALSE) for each FALSE result of the conditional test operation. The method may include performing one or more vector operations on a first element and / or a second element in the one or more operand vectors. The first element is identified by the position stored in the first vector index register (VIR_TRUE). The second element is identified by the position stored in the second vector index register (VIR_FALSE).

[0224] In some embodiments, the method may include performing a first vector operation on a first element in one or more operand vectors, the first element being identified by a position stored in a first vector index register (VIR_TRUE). Such a method may also include performing a second vector operation on a second element in the one or more operand vectors, the second element being identified by a position stored in the second vector index register (VIR_FALSE).

[0225] Fig.19 An example operation of method 1900 for constructing indexed vectors to store in vector index registers (VIR_TRUE and VIR_FALSE) for TRUE and FALSE results (e.g., "0" and "1" results) for conditional test operations according to some embodiments of the present disclosure is illustrated. Method 1900 is similar to method 1800, which differs from method 1900 in that one or more operand vectors in method 1800 are the first operand vector and the second operand vector in method 1900.

[0226] The method 1900 begins at step 1902, where a first operand vector (e.g., A(i)) stored in a first OVR is loaded via a vector load storage unit. The method 1900 continues at step 1904, where a second operand vector (e.g., B(i)) stored in a second OVR is loaded via a vector load storage unit.

[0227] The method 1900 continues at step 1906 by performing a conditional test operation on the elements of the loaded first operand vector and the elements of the loaded second operand vector based on a count stored in a counter (e.g., A(i)>B(i)). The counter may be a scalar register and may be part of the vector processor. In some embodiments, to perform the conditional test operation, the elements of the first loaded operand vector are accessed by the vector processor based on a first count in the first counter, and the elements of the second loaded operand vector are accessed by the vector processor based on a second count in the second counter.

[0228] Method 1900 continues at step 1908, where it is identified by the vector processor whether the result of the conditional test operation is a TRUE result. In other words, method 1800 continues at step 1908, where it is identified whether the result of the conditional test operation of step 1906 is TRUE or FALSE (e.g., "1" or "0"). If the result of the operation in step 1906 is TRUE, then method 1900 continues at step 1910a, where the TRUE counter is counted according to the count (e.g., according to the count, via the TRUE count stored in the TRUE counter - see for example Fig. 20 The TRUE counter 2016a depicted in FIG. 2 stores the positions of the elements of the loaded first operand vector and the second operand vector in a vector index register (VIR_TRUE) for a TRUE result of the conditional test operation. If the result of the test operation of step 1906 is FALSE, then method 1900 continues at step 1910b, where the FALSE count stored in the FALSE counter is counted according to the count (e.g., according to the count, via the FALSE count stored in the FALSE counter - see, for example, Fig. 20 The FALSE counter 2016b depicted in FIG. 2 stores the positions of the elements of the loaded first operand vector and the second operand vector in the vector index register (VIR_FALSE) for the FALSE result of the comparison. And, in some embodiments, at steps 1910a and 1910b, the corresponding VL registers for VIR_TRUE and VIR_FALSE are incremented by one.

[0229] The method 1900 continues at step 1912, where it is identified whether the count is equal to the vector length (VL) of at least one of the operand vectors. In some embodiments, for the method 1900, the VL is the same for all operand vectors in the OVR. In some embodiments, the method 1900 may continue, where it is identified whether the VL of the OVR accessed by the conditional test operation is equal to the result of adding the VL of VIR_TRUE to the VL of VIR_FALSE, which may be another way to identify whether the count is equal to the VL of the operand vector stored in the OVR. If the count is less than the VL, then the method continues at step 1914, where the count is incremented. By incrementing the count until the count is equal to the VL, the vector processor may continue with the following operations: storing the position of the element of the loaded operand vector according to the count until the position of the element of the loaded operand vector is stored in VIR_TRUE or VIR_FALSE.

[0230] At step 1912, if the count is equal to VL, then method 1900 has completed construction of the indexed vector for storage in VIR_TRUE and VIR_FALSE.

[0231] After completing the construction of the indexed vector stored in VIR_TRUE and VIR_FALSE, method 1900 continues at step 1916, where the storage locations of the elements of the loaded first operand vector and the second operand vector are loaded from at least one of VIR_TRUE or VIR_FALSE or a combination thereof by the vector load storage unit. And, method 1900 continues at steps 1918 and 1920, where one or more vector operations are iterated on the elements of the loaded first operand vector and the second operand vector according to the load locations stored in VIR_TRUE and / or VIR_FALSE. For example, the method may continue with the vector processor running A(VIR_TRUE(j))=A(VIR_TRUE(j))+B(VIR_TRUE(j)) and A(VIR_FALSE(k))=A(VIR_FALSE(k))-B(VIR_FALSE(k)). Also, for example, method 1900 continues at step 1918, where one or more vector operations are iterated on the elements of the loaded first operand vector and the second operand vector according to the load position stored in VIR_TRUE. And, for example, method 1900 continues at step 1920, where one or more vector operations are iterated on the elements of the loaded first operand vector and the second operand vector according to the load position stored in VIR_FALSE.

[0232] In other words, the method disclosed herein may include loading a first operand vector stored in a first operand vector register (OVR) and loading a second operand vector stored in a second OVR. The method may also include performing a conditional test operation on each element of the loaded first OVR and the loaded second OVR according to a count stored in a counter register. The method may also include storing positions of elements of the loaded first operand vector and the second operand vector according to the count until the positions of the elements of the loaded first operand vector and the second operand vector are stored in VIR_TRUE or VIR_FALSE. In addition, the method may include loading the storage positions of the elements of the loaded first operand vector and the second operand vector from at least one of the VIR_TRUE or the VIR_FALSE or a combination thereof by the vector load storage unit. The method may also include iterating one or more vector operations on the elements of the loaded first operand vector and the second operand vector according to the load positions.

[0233] Fig. 20 An example system 2000 for constructing an indexed vector for storage in VIR_TRUE 2002a and VIR_FALSE 2002b according to some embodiments of the present disclosure is described. System 2000 can implement many operations and aspects of methods 1800 and 1900, and system 2000 can be part of one or more vector processors. System 1200 includes VIR_TRUE 2002a and VIR_FALSE 2002b. The system also includes a first OVR 2004 and a second OVR 2006, such as the OVRs mentioned in the description of method 1900.

[0234] System 2000 also includes a counter 2008 , which may be implemented in part by a counter register and may be a counter described in the description of methods 1800 and 1900 .

[0235] The system 2000 also includes a conditional test operation 2010 that can perform a conditional test operation, such as a comparison of the values ​​stored in the first OVR 2004 and the second OVR 2006 .

[0236] Conditional test operation 2010 can perform many different types of conditional test operations, such as many different types of comparisons of OVR 2004 and 2006 or one or more of the OVRs compared to a scalar, such as 1st OVR(i) < 2nd OVR(i), 1st OVR(i) = 2nd OVR(i), 1st OVR(i) > 2nd OVR(i), 1st OVR(i) ≤ 2nd OVR(i), 1st OVR(i) ≥ 2nd OVR(i), 1st OVR(i) < scalar value, 1st OVR(i) = scalar value, 1st OVR(i) > scalar value, 1st OVR(i) ≤ scalar value, or 1st OVR(i) ≥ scalar value, etc.

[0237] The conditional test operation 2010 may run a test or comparison once or per cycle for elements of two vectors with similar addresses (e.g., similar indexes or iterations i). At each iteration i (which also represents an address or address component i), a counter 2008 provides an address i for accessing OVRs 2004 and 2006 for the conditional test operation 2010. In some examples, the elements / outputs of OVRs 2004 and 2006 at iteration or address i are compared to each other or to a value from another register (e.g., a scalar register). The conditional test operation 2010 produces a single output, which is either TRUE or FALSE (e.g., "1" or "0").

[0238] The conditional test operation 2010 may be configured to perform a test operation at step 1804 of method 1800 or step 1906 of method 1900. In other words, the conditional test operation 2010 may be configured to perform on the elements of the loaded operand vector according to the count stored in the counter register (such as counter 2008). The conditional test operation 2010 may also be configured to perform the identification of a TRUE or FALSE result at step 1806 or step 1908. In other words, the conditional test operation 2010 may be configured to identify whether the result of the conditional test operation is TRUE or FALSE. The conditional test operation 2010 may be configured to output a TRUE or FALSE result, such as a "1" for a TRUE result or a "0" for a FALSE result. The output of the conditional test operation 2010 is input into the corresponding write enable of each of VIR_TRUE 2002a and VIR_FALSE 2002b.

[0239] The output from the conditional test operation 2010 may be communicated directly to the write enable 2012a for VIR_TRUE 2002a. The output from the conditional test operation 2010 may be communicated indirectly to the write enable 2012b for VIR_FALSE 2002b via an inverter 2014. The inverter 2014 is configured to invert the output of the conditional test operation 2010 before it reaches the write enable 2012b for VIR_FALSE 2002b. For example, if the output of the conditional test operation 2010 is TRUE (e.g., "1"), then when the output is input into the inverter 2014, the inverter inverts the value to FALSE (e.g., "0") and outputs FALSE.

[0240] System 2000 also includes a separate TRUE counter 2016a for VIR_TRUE 2002a and a separate FALSE counter 2016b for VIR_FALSE 2002b. The output of comparator 2010 drives two counters, namely counters 2016a and 2016b. Counters 2016a and 2016b are separate from counter 2008 that provides address i for OVR 2004 and 2006. The output of TRUE counter 2016a is used as the address for accessing VIR_TRUE 2002a. The output of FALSE counter 2016b is used as the address for accessing VIR_FALSE 2002b. For example, when the output of conditional test operation 2010 is TRUE, the output triggers write enable 2012a to write the current position from OVR 2004 and 2006 into VIR_TRUE 2002a. When the output of comparator 2010 is FALSE, the output triggers write enable 2012b to write the current position from OVR 2004 and 2006 into VIR_FALSE 2002b. This functionality is provided via a circuit comprising an inverter 2014 and two write enablers 2012a and 2012b.

[0241] The output of counter 2008 is used as the address or address component (or index) to be written into VIR_TRUE 2002a at the address specified by TRUE counter 2016a. This occurs when the output of test operation 2010 is TRUE. For each TRUE toggled output from test operation 2010, the value stored in counter TRUE 2016a is incremented by one. The output of counter 2008 is used as the address or address component to be written into VIR_FALSE 2002b at the address specified by FALSE counter 2016b. This occurs when the output of test operation 2010 is FALSE. For each FALSE toggled output from test operation 2010, the value stored in FALSE counter 2016b is incremented by one. This overall functionality of selecting where to store the address of the OVR component is provided by circuitry including test operation 2010, write enablers 2012a and 2012b, inverter 2014, and TRUE counter 2016a and FALSE counter 2016b.

[0242] VIR_TRUE 2002a and VIR_FALSE 2002b are each similar to Fig.12 1202a and 1202b in the system 1200 depicted in FIG. 1200. The system 2000, which is somewhat similar to the system 1200, may be part of a vector processor including a vector storage unit.

[0243] System 2000 is also shown to include a scalar register for vector length, namely vector length register 2024 (VLR2024). VLR 2024 is configured to store the vector length (VL) of OVR 2004 and 2006. The vector processor can load the VL from VLR 2024 into memory to identify whether the count from counter 2008 is equal to the VL of the corresponding operand vector stored in OVR 2004 and 2006. In other words, a value is located in the register of the VL of the operand vector in OVR 2004 and 2006. This is, for example, to implement Fig.18 Step 1812 of method 1800 or Fig.192002a or VIR_FALSE 2002b. In other words, the system 2000 may continue to store the positions of the elements of the OVRs 2004 and 2006 according to the count until the positions of the elements of the OVRs are stored in VIR_TRUE 2002a or VIR_FALSE 2002b. This is one of the ways in which the system 2000 may implement the operation of the method 1800 or the method 1900.

[0244] If the count is equal to VL, then the vector processor using system 2000 has completed the construction of the indexed vector stored in VIR_TRUE 2002a and VIR_FALSE 2002b. The count cannot be greater than VL because the operation of building the indexed vector is completed when the count is equal to VL. When a new indexed vector is constructed, the count is reset in counter 2008, and VL is determined and stored in VLR 2024. The vector processor can initially determine the vector length of the OVR (e.g., the length of OVR 2004 and 2006), and then store the length (which is a length) in VLR 2024 before executing method 1800 or 1900.

[0245] Fig.21 and 22 1 and 2 according to some embodiments of the present disclosure for determining the value of VIR_TRUE and VIR_FALSE (e.g., see Fig.23 2202a and VIR_FALSE 2202b) to perform operations on elements of an operand vector.

[0246] Alternatively, according to some embodiments of the present disclosure, the example operation of method 2100 for performing operations on elements of an operand vector may be performed according to the TRUE and FALSE sections of VIR_COMBINED (e.g., see Fig.24 2302). In such examples, the count is not reset during the execution of operations on the operand vector.

[0247] Furthermore, example operations of method 2100 for performing operations on elements of an operand vector may be based on VIR_TRUE and VIR_FALSE accessed in parallel because, for example, according to some embodiments of the present disclosure, both occurrences of position i in VIR_TRUE and VIR_FALSE are in the same clock cycle or iteration (e.g., see Fig.25 2402a and VIR_FALSE 2402b) are accessed in the example of VIR_TRUE 2402a and VIR_FALSE 2402b depicted in FIG. In such examples, the vector lengths VL_VIR_TRUE and VL_VIR_FALSE of VIR_TRUE and VIR_FALSE are not compared to the count, and the count is not reset during the operation on the operand vector. Moreover, in such examples and other examples, step 2116 may occur per clock cycle or iteration of the operation. Moreover, in such examples where VIR is accessed in parallel, steps 2106 to 2112 and steps 2120 to 2126 may also be performed in parallel.

[0248] exist Fig.21 , method 2100 starts at step 2102, where a first input operand vector stored in a first input OVR is loaded by a vector load storage unit. Method 2100 continues at step 2104, where a second input operand vector stored in a second input OVR is loaded by a vector load storage unit. Method 2100 continues at step 2106, where a count stored in a counter register is loaded by a vector load storage unit. Method 2100 continues at step 2108, where storage locations of corresponding elements of the loaded first input operand vector and second input operand vector are loaded from VIR_TRUE (or the TRUE section of VIR_COMBINED) according to the count by a vector load storage unit.

[0249] The method 2100 continues at step 2110, where a first operation (e.g., addition) is performed on corresponding elements of the loaded first input operand vector and second input operand vector according to the load location from VIR_TRUE (or the TRUE section of VIR_COMBINED). Step 2110 includes step 2112, which includes the method 2100 continuing to store the result of the first operation (e.g., produced by the ALU) in the output OVR at a location corresponding to the load location from VIR_TRUE (or the TRUE section of VIR_COMBINED).

[0250] The method 2100 continues at step 2114, where the count is compared to a value representing the vector length of VIR_TRUE (or the TRUE section of VIR_COMBINED), i.e., VL_VIR_TRUE, so that the first operation can be iterated for each of the positions stored in VIR_TRUE (or the TRUE section of VIR_COMBINED) on the loaded first and second input operand vectors stored in the input operand vector register. When the count is equal to the vector length of VIR_TRUE, the method 2100 continues at step 2118, where the count in the count register is reset.

[0251] It should be understood that VL_VIR_TRUE and VL_VIR_FALSE are preloaded with the vector lengths of VIR_TRUE and VIR_FALSE prior to initiating method 2100. In some embodiments, VL_VIR_TRUE and VL_VIR_FALSE are loaded with the lengths of the vectors in VIR_TRUE and VIR_FALSE, while VIR_TRUE and VIR_FALSE are loaded with vector index elements (e.g., see steps 1808, 1810, 1910a, and 1910b).

[0252] When the count is less than the vector length, the method 2100 continues at step 2114, where the count is incremented at 2116, and then returns to step 2106 (load the count stored in the counter register), followed by steps 2108 (load the storage locations of the corresponding elements of the loaded input operand vector from VIR_TRUE (or the TRUE section of VIR_COMBINED) according to the count through the vector load storage unit) and 2110 (perform the first operation on the elements of the loaded input operand vector according to the loaded locations from VIR_TRUE (or the TRUE section of VIR_COMBINED). In this way, the first operation is iterated on the input OVR for each of the locations stored in VIR_TRUE (or the TRUE section of VIR_COMBINED).

[0253] As mentioned, at step 2118, when the count is equal to the vector length of VIR_TRUE, then method 2100 continues with resetting the count in the count register. However, when VIR_COMBINED is used, resetting of the count does not occur because the initial position of the FALSE segment of VIR_COMBINED is the first position after the last position of the TRUE segment of VIR_COMBINED (which is not position "0").

[0254] Subsequently, the method 2100 continues at step 2120, where the count stored in the counter register is loaded by the vector load storage unit. In the example using VIR_TRUE and VIR_FALSE, the value of the count at the first iteration of step 2120 is "0". In the example using VIR_COMBINED, the value of the count at the first iteration of step 2120 is the value of the first position representing the FALSE section of VIR_COMBINED.

[0255] The method 2100 continues at step 2122 , where the storage locations of the corresponding elements of the loaded first and second input operand vectors are loaded from VIR_FALSE (or the FALSE section of VIR_COMBINED) according to the count by the vector load store unit.

[0256] The method 2100 continues at step 2124, where a second operation (e.g., subtraction) is performed on corresponding elements of the loaded first input operand vector and second input operand vector according to the load location from VIR_FALSE (or the FALSE section of VIR_COMBINED). Step 2124 includes step 2126, which includes the method 2100 continuing to store the result of the second operation (e.g., produced by the ALU) in the output OVR at a location corresponding to the load location from VIR_FALSE (or the FALSE section of VIR_COMBINED).

[0257] The method 2100 continues at step 2128, where the count is compared to a value representing the vector length of VIR_FALSE (or the FALSE section of VIR_COMBINED), i.e., VL_VIR_FALSE, so that the first operation can be iterated for each of the locations stored in VIR_FALSE (or the FALSE section of VIR_COMBINED) on the loaded first and second input operand vectors stored in the input operand vector register. When the count is equal to the vector length of VIR_FALSE, then the method 2100 ends.

[0258] It should be understood that VL_VIR_TRUE and VL_VIR_FALSE are preloaded with the vector lengths of VIR_TRUE and VIR_FALSE prior to initiating method 2100. In some embodiments, VL_VIR_TRUE and VL_VIR_FALSE are loaded with the lengths of the vectors in VIR_TRUE and VIR_FALSE, while VIR_TRUE and VIR_FALSE are loaded with vector index elements (e.g., see steps 1808, 1810, 1910a, and 1910b).

[0259] When the count is less than the vector length, the method 2100 continues at step 2128, where the count is incremented at 2130, and then returns to step 2120 (load the count stored in the counter register), followed by steps 2122 (load the storage locations of the corresponding elements of the loaded input operand vector from VIR_FALSE (or the FALSE section of VIR_COMBINED) according to the count through the vector load storage unit) and 2124 (run the second operation on the elements of the loaded input operand vector according to the loaded locations from VIR_FALSE (or the FALSE section of VIR_COMBINED). In this way, the second operation is iterated on the input OVR for each of the locations stored in VIR_FALSE (or the FALSE section of VIR_COMBINED).

[0260] In some embodiments, after the address of the input OVR is stored in VIR_TRUE and VIR_FALSE (or the TRUE section and FALSE section of VIR_COMBINED), the method may include loading a second count from a second counter register (where the first count from the first count register is used to store the address in VIR). The method may also include loading storage locations of corresponding elements of the loaded first and second input operand vectors according to the second count from VIR_TRUE (or the TRUE section). The method may also include running a first operation on corresponding elements of the loaded first and second input operand vectors according to the load locations from VIR_TRUE (or the TRUE section).

[0261] The method may also include storing a result of the first operation in an output OVR at a location corresponding to a load location from the VIR_TRUE (or TRUE segment). The method may also include continuing to run the first operation on corresponding elements of the loaded first and second input operand vectors according to the load location from the VIR_TRUE (or TRUE segment), and storing the results of the first operation in the output OVR at corresponding locations that match the load location from the VIR_TRUE (or TRUE segment) until a second count equals the length of the VIR_TRUE (or TRUE segment), wherein the count is incremented for each load location from the VIR_TRUE (or TRUE segment).

[0262] The method may also include: resetting the second count when the second count is equal to the length of VIR_TRUE (or TRUE segment); and after resetting the second count, loading the storage locations of corresponding elements of the loaded first input operand vector and second input operand vector from VIR_FALSE (or FALSE segment) according to the second count.

[0263] The method may also include running a second operation on corresponding elements of the loaded first and second input operand vectors according to the load position from VIR_FALSE (or FALSE segment). The method may also include continuing to run the second operation on corresponding elements of the loaded first and second input operand vectors according to the load position from VIR_FALSE (or FALSE segment), and storing results of the second operation in the output OVR at corresponding positions that match the load position from VIR_FALSE (or FALSE segment) until a second count equals the length of VIR_FALSE (or FALSE segment), wherein the count is incremented for each load position from VIR_FALSE (or FALSE segment).

[0264] In the methods described herein, the first operation may include addition, subtraction, multiplication, division, or any other type of operation that can be performed by one or more ALUs. Also, the second operation may include an operation different from the first operation that can be performed by one or more ALUs.

[0265] Fig.23 An example system 2200 including VIR_TRUE 2202a and VIR_FALSE 2202b for performing a first operation and a second operation on elements of an input operand vector stored in input operand vector registers 2204a and 2204b is illustrated according to some embodiments of the present disclosure. The example system 2200 is an example of a system that can implement at least the method 2100.

[0266] exist Fig.232204a and 2204b. For example, "1" is stored in position "0" of VIR_TRUE 2022a, which can be used as an address for accessing position "1" in both input OVRs 2204a and 2204b. Also, VIR_FALSE 2202b stores a list of positions of input OVRs 2204a and 2204b. For example, "0" and "2" are stored in positions "0" and "1" of VIR_FALSE 2022a, respectively, which can be used as addresses for accessing positions "0" and "2" in both input OVRs 2204a and 2204b.

[0267] exist Fig.23 In this illustrated example, the vector processor is shown performing at least two iterations of a subtraction operation and at least one iteration of an addition operation. In the first iteration of the at least two cycles of the subtraction operation, the counter 2206 outputs a count of "0", which is the value stored in the counter in the first cycle during the subtraction mode. In the first cycle of the subtraction mode, VIR_FALSE 2202b is shown as outputting the selected address "0" from the position "0" of VIR_FALSE. In the first iteration of the at least one cycle of the addition operation, the counter 2206 also outputs a count of "0", which is the value stored in the counter in the first cycle during the addition mode. In the first cycle of the addition mode, VIR_TRUE 2202a is shown as outputting the selected address "1" from the position "0" of VIR_TRUE.

[0268] Multiplexer 2208 selects between the address component (“0”) as specified by counter 2206 operating in normal mode or the address component (“1”) as stored in position “0” of VIR_TRUE 2202a in TRUE mode of operation or the address component (“0”) as stored in position “0” of VIR_FALSE 2202b in FALSE mode of operation. In the next loop or iteration, when the address component specified by counter 2206 is “1”, multiplexer 2208 selects between the address component (“1”) as specified by counter 2206 operating in normal mode or the address component (“5”) as stored in position “1” of VIR_TRUE 2202a in TRUE mode of operation or the address component (“2”) as stored in position “1” of VIR_FALSE 2202b in FALSE mode of operation, and so on. In other words, multiplexer 2208 selects between the outputs of counter 2206, VIR_TRUE 2202a, and VIR_FALSE 2202b. Moreover, the outputs provided by VIR_TRUE 2202a and VIR_FALSE 2202b are based on the count of counter 2206. In method 2100, multiplexer 2208 can implement a switch from TRUE mode to FALSE mode after resetting the counter in step 2118. When the count is equal to the vector length of VIR_TRUE or VIR_FALSE (e.g., see VL_VIR_TRUE 2212a and VL_VIR_FALSE 2212b), counter 2206 is reset. This switch allows the loop of steps 2106 to 2116 to switch to the loop of steps 2120 to 2130.

[0269] It should be understood that the selections described herein may be according to programmer visible instructions and / or may be hardwired circuitry that performs some high level semantic operations.

[0270] When the TRUE mode is selected by multiplexer 2208 in the first cycle, the output "1" from VIR_TRUE 2202a is the address component used to access input OVRs 2204a and 2204b. As a result, input OVRs 2204a and 2204b are accessed for the corresponding outputs of element "30" at position "1" of input OVR 2204a and element "25" at position "1" of input OVR 2204b. Output OVR 2210 (or the third OVR) is also addressed at position "1". In this example, position "1" is output by multiplexer 2208, which has been selected for the TRUE mode. Also, in the TRUE mode, ALU 2214 executes the address for element "25" at position "1" of input OVR 2204a. Fig.232214. The addition operation is based on the first opcode 2216a selected by the multiplexer 2218 in the TRUE mode. Specifically, as shown, the elements of the input OVRs 2204a and 2204b at position "1" (elements "30" and "25") are input to the ALU 2214. The ALU 2214 adds the elements of the positions "1" of the OVRs 2204a and 2204b and outputs the result of the addition operation. The output of the addition operation is then stored at position "1" of the output OVR 2210 as element "55" (A(1)+B(1)=C(1) or 30+25=55).

[0271] When the FALSE mode is selected by multiplexer 2208 in the first cycle, the output "0" from VIR_FALSE 2202b is the address component used to access input OVRs 2204a and 2204b. As a result, input OVRs 2204a and 2204b are accessed for the corresponding outputs of element "10" at position "0" of input OVR 2204a and element "20" at position "0" of input OVR 2204b. Output OVR 2210 (or the third OVR) is also addressed at position "0". In this example, position "0" is output by multiplexer 2208, which has been selected for FALSE mode. Moreover, in FALSE mode, ALU 2214 performs an address for element "10" at position "0" of input OVR 2204a and element "20" at position "0" of input OVR 2204b. Output OVR 2210 (or the third OVR) is also addressed at position "0". In this example, position "0" is output by multiplexer 2208, which has been selected for FALSE mode. Moreover, in FALSE mode, ALU 2214 performs an address for element "10" at position "0" of input OVR 2204a and element "20" at position "0" of input OVR 2204b. Fig.23 2204a, the element at position "0" of OVR 2204b, and the output result of the subtraction operation. The output of the subtraction operation is then stored at position "0" of output OVR 2210 as element "-10" (A(0)-B(0)=C(0) or 10-20=-10).

[0272] It should be understood that Fig.23 The addition and subtraction operations illustrated in are merely examples, and various operations may be performed on the OVRs 2204a and 2204b according to the addressing of the VIRs 2202a and 2202b. Thus, the first opcode 2216a may be an opcode for any arithmetic operation of the ALU, and the second opcode 2216b may also be an opcode for any arithmetic operation of the ALU.

[0273] As mentioned, the system 2200 may implement the method 2100. For example, one or more operand vectors are loaded by a vector load store unit of a vector processor (at steps 2102 and 2104), each of which may be stored in OVRs 2204a and 2204b. A count stored in a counter register is loaded by a vector load store unit, which may be stored in counter 2206. The stored location is loaded from a VIR by a vector load store unit of a vector processor (at steps 2108 and 2122), which may be stored in VIRs 2202a and 2202b. Execution of the first operation and the second operation in steps 2110 and 2124 may be performed by Fig.23 The storage of the operation results (in steps 2112 and 2126) may occur at the output OVR 2210. Also, the loop in method 2100 may be controlled based on at least the length stored in registers 2212a and 2212b.

[0274] Fig.24 An example system 2300 is illustrated including a TRUE section and a FALSE section of VIR_COMBINED 2302 for performing a first operation and a second operation on elements of an input operand vector stored in input operand vector registers 2304a and 2304b according to some embodiments of the present disclosure. The example system 2300 is an example of a system that can implement at least most of the method 2100.

[0275] The address components stored in VIR_COMBINED 2302 are stored in the TRUE segment (e.g., addresses 0, 1, 2, ..., L-1, where L is the vector length of the TRUE segment) or in the FALSE segment of VIR (e.g., addresses N-1, N-2, N-3, ..., NM, where N is the length of the index vector stored in VIR, and M is the vector length of the FALSE segment). Depending on the embodiment, the indexes in the TRUE segment are generated and stored in VIR_COMBINED 2302 from top to bottom, and the indexes in the FALSE segment are generated and stored in the FALSE segment from bottom to top, or vice versa.

[0276] exist Fig.24, the TRUE section of VIR_COMBINED 2302 stores a list of positions of input OVRs 2304a and 2304b. For example, output position "1" is stored in position "0" of the TRUE section, which can be used as an address for accessing position "1" in both input OVRs 2304a and 2304b. Also, the FALSE section of VIR_COMBINED 2302 stores a list of positions of input OVRs 2304a and 2304b. For example, "0" and "2" are stored in positions "N-1" and "N-2" of the FALSE section, respectively (where N is the length of the vector index stored in VIR_COMBINED). The output positions of the FALSE section can be used as addresses for accessing "0" and "2" in both input OVRs 2304a and 2304b.

[0277] exist Fig.24 In this illustrated example of , the vector processor is shown running at least three cycles of addition operations and at least three cycles of subtraction operations. At the first iteration of the at least three cycles of addition operations, counter 2306 outputs a count of "0", which is the value stored in the counter at the first cycle during the addition mode. As shown, the addition mode consists of Fig.24 The "Mode 2" shown in is provided. Fig.24 The "Mode 1" shown in provides a mode for selecting a normal operating mode or a VIR_COMBINED operating mode. In the first cycle of the addition mode, the TRUE segment is shown as outputting the selected address "1" from position "0" of VIR_TRUE. In the first iteration of at least three cycles of the subtraction operation, the counter 2306 outputs a count "NM", which is the value stored in the counter at the first cycle during the subtraction mode. In the first cycle of the subtraction mode, the FALSE segment is shown as outputting the selected address "X" from position "NM" of the FALSE segment. In the second to last cycle of the subtraction mode, the FALSE segment is shown as outputting the selected address "2" from position "N-2" of the FALSE segment. In the last cycle of the subtraction mode, the FALSE segment is shown as outputting the selected address "0" from position "N-1" of the FALSE segment.

[0278] Multiplexer 2308 selects between the address component ("0") as specified by counter 2306 in normal mode operation or the address component ("1") as stored in position "0" of the TRUE segment in the TRUE mode of operation. In the next cycle or iteration, when the address component specified by counter 2306 is "1", then multiplexer 2308 selects between the address component ("1") as specified by the counter in normal mode operation or the address component ("5") as stored in position "1" of the TRUE segment in the TRUE mode of operation; and so on. When counter 2306 has a value of "NM", the mode of operation may be switched from TRUE mode to FALSE mode immediately. Register VL_VIR_FALSE 2312b may be used to populate an evaluation that determines the counter has a value of "NM". At some point after the count reaches "NM", when the count finally reaches "N-1", the multiplexer 2308 selects between the address component ("N-1") as specified by the counter in the normal operating mode or the address component ("0") as stored in position "N-1" of the FALSE segment in the FALSE operating mode.

[0279] Multiplexer 2308 selects between the output of counter 2306 and VIR_COMBINED 2302. Moreover, the output provided by the TRUE segment and the FALSE segment is based on the count of counter 2306. In method 2100, multiplexer 2308 does not implement the switch from TRUE mode to FALSE mode after resetting the counter in step 2118. In this way, multiplexers 2208 and 2308 function differently. In method 2100, multiplexer 2318 indicates the operating mode of system 2300. The counter is not reset, but when the count reaches the value "NM", the operating mode can be changed in system 2300 (e.g., "mode 2" can be changed). When the last position of the TRUE segment is accessed, counter 2306 has a value of "L-1", where L is the length of the TRUE segment. L can be stored in VL_VIR_TRUE 2312a. When the first position of the FALSE segment is accessed, the counter 2306 has the value "NM", where M is the length of the FALSE segment and N is the total length of the index vector. M may be stored in VL_VIR_FALSE 2312b. The switch from the loop of steps 2106 to 2116 to the loop of steps 2120 to 2130 may be initiated via Fig.24 The selected mode "Mode 2" depicted in FIG. 2 occurs. And, when the count equals the length of the TRUE segment, switching can occur. However, unlike method 2100, there is no reset of the count because the position "NM" is the first position of the FALSE segment instead of the position "0".

[0280] When the TRUE mode is selected by multiplexer 2318 in the first cycle, the output "1" from the TRUE section is the address component used to access input OVRs 2304a and 2304b. As a result, input OVRs 2304a and 2304b are accessed for the corresponding outputs of element "30" at position "1" of input OVR 2304a and element "25" at position "1" of input OVR 2304b. Output OVR 2310 (or the third OVR) is also addressed at position "1". In this example, position "1" is output by multiplexer 2308, which has been selected for COMBINED_VIR mode. In the TRUE mode provided by "Mode 2", ALU 2314 performs an address for element "30" at position "1" of input OVR 2304a and element "25" at position "1" of input OVR 2304b. Output OVR 2310 (or the third OVR) is also addressed at position "1". In this example, position "1" is output by multiplexer 2308, which has been selected for COMBINED_VIR mode. In the TRUE mode provided by "Mode 2", ALU 2314 performs an address for element "30" at position "1" of input OVR 2304a and element "25" at position "1" of input OVR 2304b. Fig.24 2314. The addition operation is based on the first opcode 2316a selected by the multiplexer 2318 in the TRUE mode. Specifically, as shown, the elements of the input OVRs 2304a and 2304b at position "1" (elements "30" and "25") are input to the ALU 2314. The ALU 2314 adds the elements of the positions "1" of the OVRs 2304a and 2304b and outputs the result of the addition operation. The output of the addition operation is then stored at position "1" of the output OVR 2310 as element "55" (A(1)+B(1)=C(1) or 30+25=55).

[0281] When the FALSE mode is selected by multiplexer 2318 in cycle "NM", the output "X" from the FALSE section is the address component used to access input OVRs 2304a and 2304b. This process continues until, for example, cycle "N-1" occurs. As a result, in cycle "N-1" in FALSE mode, input OVRs 2304a and 2304b are accessed for corresponding outputs for element "10" at position "0" of input OVR 2304a and element "20" at position "0" of input OVR 2304b. Output OVR 2310 (or a third OVR) is also addressed at position "0". In this example, position "0" is output by multiplexer 2308, which has been selected for COMBINED_VIR mode. Also, in FALSE mode, ALU 2314 performs an address address for element "10" at position "0" of input OVR 2304a and element "20" at position "0" of input OVR 2304b. Fig.242316b selected by the multiplexer 2318 in the FALSE mode. Specifically, as shown, the elements of the input OVRs 2304a and 2304b at position “0” (elements “10” and “20”) are input into the ALU 2314. The ALU 2314 subtracts the element at position “0” of the OVR 2304a from the element at position “0” of the OVR 2304b and outputs the result of the subtraction operation. The output of the subtraction operation is then stored at position “0” of the output OVR 2310 as the element “-10” (A(0)-B(0)=C(0) or 10-20=-10).

[0282] It should be understood that Fig.24 The addition and subtraction operations illustrated in are merely examples, and various operations may be performed on the OVRs 2304a and 2304b according to the addressing of the VIRs 2302a and 2302b. Thus, the first opcode 2316a may be the opcode for any arithmetic operation of the ALU, and the second opcode 2316b may also be the opcode for any arithmetic operation of the ALU.

[0283] As mentioned, the system 2300 may implement most of the method 2100. For example, one or more operand vectors are loaded by a vector load store unit of a vector processor (at steps 2102 and 2104), each of which may be stored in OVR 2304a and 2304b. A count stored in a counter register is loaded by a vector load store unit, which may be stored in counter 2306. The stored location is loaded from VIR by a vector load store unit of a vector processor (at steps 2108 and 2122), which may be stored in the TRUE section and the FALSE section of VIR_COMBINED. Execution of the first operation and the second operation in steps 2110 and 2124 may be performed by Fig.24 The combination of OVR, VIR_COMBINED, multiplexer, and ALU depicted in FIG. Storage of the operation results (in steps 2112 and 2126) may occur at the output OVR 2310. Also, loops in method 2100 may be controlled based on at least the length stored in registers 2312a and 2312b.

[0284] Fig.25An example system 2400 including VIR_TRUE 2402a and VIR_FALSE 2402b for performing a first operation and a second operation on elements of an input operand vector stored in input operand vector registers 2404a and 2404b in parallel is illustrated according to some embodiments of the present disclosure. Example system 2400 is an example of a system that can implement at least most of method 2100.

[0285] Running the first operation and the second operation in parallel includes accessing VIR_TRUE and VIR_FALSE in parallel. Accessing VIR_TRUE and VIR_FALSE in parallel includes, for example, accessing two occurrences of position i in VIR_TRUE and VIR_FALSE in the same clock cycle or iteration. In such examples, the vector lengths of VIR_TRUE and VIR_FALSE, VL_VIR_TRUE, and VL_VIR_FALSE are not compared to the count (e.g., Fig.21 and 22 ), and does not reset the count during operations on the operand vector (as shown in Fig.21 ). However, when the VIR is accessed in parallel, step 2116 of method 2100 may occur in each clock cycle or iteration of the operation. Moreover, in such an example where the VIR is accessed in parallel, steps 2106 to 2112 and steps 2120 to 2126 may also be performed in parallel.

[0286] exist Fig.25 2404a and 2404b. In the example, VIR_TRUE 2402a stores a list of locations of input OVRs 2404a and 2404b. For example, "1" is stored in location "0" of VIR_TRUE 2022a, which can be used as an address for accessing location "1" in both input OVRs 2404a and 2404b. Also, VIR_FALSE 2402b stores a list of locations of input OVRs 2404a and 2404b. For example, "0" and "2" are stored in locations "0" and "1" of VIR_FALSE 2022a, respectively, which can be used as addresses for accessing locations "0" and "2" in both input OVRs 2404a and 2404b.

[0287] exist Fig.25In this illustrated example of , the vector processor is shown performing at least two cycles of subtraction operations and at least one cycle of addition operations. In the first iteration of the at least two cycles of subtraction operations, the counter 2406 outputs a count of "0", which is the value stored in the counter in the first cycle during the subtraction mode. In the first cycle of the subtraction mode, VIR_FALSE 2402b is shown as outputting the selected address "0" from the position "0" of VIR_FALSE. In the first iteration of at least one cycle of addition operations, the counter 2406 also outputs a count of "0", which is the value stored in the counter in the first cycle during the addition mode. In the first cycle of the addition mode, VIR_TRUE 2402a is shown as outputting the selected address "1" from the position "0" of VIR_TRUE.

[0288] exist Fig.25 In the embodiment of the present invention, there is no multiplexer for selecting normal or VIR mode or for selecting TRUE or FALSE mode. Since the access of VIR 2402a and 2402b and the operation on OVR 2404a and 2404b are performed in parallel using separate ALUs 2414a and 2414b for the operation addressed by TRUE_VIR 2402a and the operation addressed by FALSE_VIR 2402b, respectively, no multiplexer is required.

[0289] In other words, Fig.25 The TRUE mode and the FALSE mode can be run in all clock cycles of the operation. Therefore, the TRUE mode and the FALSE mode can be run in parallel with each other.

[0290] One example way to implement operations in parallel is to use dual access registers in a system running parallel operations. Fig.25 In order to implement the first operation and the second operation in parallel, the OVRs (e.g., OVRs 2404a, 2404b, and 2410) are dual access OVRs. The dual access vector registers (e.g., OVRs 2404a, 2404b, and 2410) each have two address lines and two input / output (I / O) lines. For example, output OVR 2410 has address line I / O1, which directs addressing of I / O line I / O7; and address line I / O2 directs addressing of I / O line I / O8. In other words, data retrieved from the address lines connected to VIR_T 2402a directs addressing of outputs from the first ALU 2414a, and data retrieved from the address lines connected to VIR_F 2402a directs addressing of outputs from the second ALU 2414b.

[0291] In the first cycle for TRUE mode, the output "1" from VIR_TRUE 2402a is the address component used to access input OVRs 2404a and 2404b. As a result, input OVRs 2404a and 2404b are accessed for respective outputs of element "30" at position "1" of input OVR 2404a and element "25" at position "1" of input OVR 2404b. Output OVR 2410 (or the third OVR) is also addressed at position "1". In this example, position "1" is output directly by VIR_TRUE 2402a without passing through a multiplexer. ALU 2414a performs an address for Fig.24 2404a and 2404b at position "1" (elements "30" and "25") are input to ALU 2414a as shown. ALU 2414a adds the elements at position "1" of OVRs 2404a and 2404b and outputs the result of the addition operation. The output of the addition operation is then stored at position "1" of output OVR 2410 as element "55" (A(1)+B(1)=C(1) or 30+25=55).

[0292] In the first cycle for FALSE mode, the output "0" from VIR_FALSE 2402B is the address component used to access input OVRs 2404a and 2404b. As a result, input OVRs 2404a and 2404b are accessed for respective outputs of element "10" at position "0" of input OVR 2404a and element "20" at position "0" of input OVR 2404b. Output OVR 2410 (or the third OVR) is also addressed at position "0". In this example, position "0" is output directly by VIR_FALSE 2402b without passing through the multiplexer. ALU 2414B performs an address for Fig.24 2404a and 2404b at position “0” (elements “10” and “20”) are input to ALU 2414b as shown. ALU 2414b subtracts the element at position “0” of OVR 2404b from the element at position “0” of OVR 2404a and outputs the result of the subtraction operation. The output of the subtraction operation is then stored at position “0” of output OVR 2410 as element “-10” (A(0)-B(0)=C(0) or 10-20=-10).

[0293] It should be understood that Fig.25The addition and subtraction operations illustrated in are merely examples, and various operations may be performed on OVRs 2404a and 2404b according to the addressing of VIRs 2402a and 2402b. Thus, ALU 2414a may perform any arithmetic operation of an ALU, and ALU 2414b may also perform any arithmetic operation of an ALU.

[0294] As mentioned, the system 2400 may implement a majority of the method 2100. For example, one or more operand vectors are loaded by a vector load store unit of a vector processor (at steps 2102 and 2104), each of which may be stored in OVRs 2404a and 2404b. A count stored in a counter register is loaded by a vector load store unit, which may be stored in counter 2406. The stored location is loaded from a VIR by a vector load store unit of a vector processor (at steps 2108 and 2122), which may be stored in VIRs 2402a and 2402b. Execution of the first operation and the second operation in steps 2110 and 2124 may be performed by Fig.25 The combination of OVR, VIR, and ALU depicted in 2100 is implemented. Storage of the results of the operation (at steps 2112 and 2126) may occur at the output OVR 2410. Also, loops in method 2100 may be controlled based on at least the length stored in registers 2412a and 2412b (which may store the vector lengths of VIR_TRUE 2402a and VIR_FALSE 2402b, respectively).

[0295] Methods 600, 700, 900, 1000, 1100, 1300, 1600, 1800, 1900, and 2100 include only some of the many operations that may be performed by the vector processors and systems described herein.

[0296] Some portions of the previous detailed description have been presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means by which those skilled in the art of data processing can most effectively convey the substance of their work to others skilled in the art. In this article, and generally, an algorithm is conceived to be a self-consistent sequence of operations that produce a desired result. An operation is one that requires physical manipulation of physical quantities. Typically (but not necessarily), these quantities take the form of electrical or magnetic signals that can be stored, combined, compared, and otherwise manipulated. It has proven to be convenient at times, primarily for common reasons, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, and the like.

[0297] It should be borne in mind, however, that all of these and similar terms will be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. The present disclosure may refer to the actions and processes of a computer system or similar electronic computing device that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system's memories or registers or other such information storage systems.

[0298] The present disclosure also relates to an apparatus for performing the operations described herein. This apparatus may be specially constructed for the intended purpose, or it may comprise a computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer-readable storage medium, such as, but not limited to, any type of disk, including a floppy disk, an optical disk, a CD-ROM, and a magnetic optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic card or an optical card, or any type of medium suitable for storing electronic instructions, each of which is connected to a computer system bus.

[0299] The algorithms and displays presented herein are not inherently related to any particular computer or other device. Various systems may be used with the program according to the teachings herein, or it may prove convenient to construct a more specialized device to perform the method. The structures of various these systems will be presented as set forth in the description below. In addition, the present disclosure is not described with reference to any particular programming language. It should be appreciated that the teachings of the present disclosure as described herein may be implemented using various programming languages.

[0300] The present disclosure may be provided in part as a computer program product or software, which may include a machine-readable medium having instructions stored thereon, which instructions may be used to program a computer system (or other electronic device) to perform a process according to the present disclosure. A machine-readable medium includes any mechanism for storing information in a form readable by a machine (e.g., a computer). In some embodiments, a machine-readable (e.g., computer-readable) medium includes a machine (e.g., computer) readable storage medium, such as a read-only memory ("ROM"), a random access memory ("RAM"), a magnetic disk storage medium, an optical storage medium, a flash memory component, etc.

[0301] In the foregoing description, embodiments of the present disclosure have been described with reference to specific example embodiments thereof. It will be apparent that various modifications may be made to the present disclosure without departing from the broader spirit and scope of the embodiments of the present disclosure as set forth in the appended claims. Therefore, the description and drawings should be viewed in an illustrative sense rather than a restrictive sense.

Claims

1. A method of operating a vector processor, comprising: loading one or more operand vectors by a vector load store unit of the vector processor, each vector of the one or more operand vectors being stored in a corresponding operand vector register; Performing, by the vector processor, a conditional test operation on each element of at least one of the loaded one or more operand vectors according to a count stored in a counter register until the count stored in the counter register is equal to a vector length of at least one of the one or more operand vectors, wherein for each element of the at least one of the loaded one or more operand vectors, according to the count stored in the counter register, the performing comprises: responsive to a result indicating that the corresponding element satisfies the test in the conditional test operation, storing a position identified by the count of the corresponding element in a first vector index register; responsive to the result indicating that the corresponding element does not satisfy the test in the conditional test operation, storing a position identified by the count of the corresponding element in a second vector index register; and incrementing the count in response to the count being less than the vector length of the at least one of the one or more operand vectors; loading, by the vector load store unit, the stored locations of the elements of the loaded one or more operand vectors from at least one of the first vector index register or the second vector index register or a combination thereof; performing a first vector operation on a first element in the one or more operand vectors, the first element being identified by a location stored in the first vector index register; and A second vector operation is performed on a second element in the one or more operand vectors, the second element being identified by a position stored in the second vector index register.

2. The method according to claim 1, wherein the loading of the one or more operand vectors comprises: loading a first operand vector stored in a first operand vector register; as well as loading a second operand vector stored in a second operand vector register; wherein the performing the conditional test operation on each element of at least one of the loaded one or more operand vectors comprises performing the conditional test operation on each element of the loaded first operand vector register and the loaded second operand vector register according to the count stored in the counter register; and Wherein storing the positions of the elements comprises storing the positions of the elements of the loaded first operand vector and second operand vector according to the count until the positions of the elements of the loaded first operand vector and second operand vector are stored in the first vector index register or the second vector index register.

3. The method of claim 2, wherein the first operand vector is a first input operand vector and the second operand vector is a second input operand vector, and wherein the method further comprises: loading a second count from a second counter register; loading storage locations of corresponding elements of the loaded first input operand vector and second input operand vector according to the second count from the first vector index register; as well as A first operation is performed on the corresponding elements of the loaded first and second input operand vectors according to the load locations from the first vector index register. 4 . The method of claim 3 , further comprising storing a respective result of the first operation in an output operand vector register at a location corresponding to a respective load location from the first vector index register.

5. The method according to claim 4, further comprising: continuing to perform the first operation on the corresponding elements of the loaded first and second input operand vectors according to the corresponding load positions from the first vector index register, and storing the corresponding results of the first operation in the output operand vector register at the positions corresponding to the corresponding load positions from the first vector index register until the second count equals the length of the first vector index register, wherein the second count is incremented for each load position from the first vector index register; as well as When the second count is equal to the length of the first vector index register, the second count is reset.

6. The method according to claim 5, further comprising: after resetting the second count, loading storage locations of corresponding elements of the loaded first input operand vector and second input operand vector according to the second count from the second vector index register; and A second operation is performed on the corresponding elements of the loaded first and second input operand vectors according to the load positions from the second vector index register.

7. The method according to claim 6, further comprising: The second operation continues to be performed on respective elements of the loaded first and second input operand vectors according to respective load positions from the second vector index register, and respective results of the second operation are stored in the output operand vector register at the positions corresponding to the respective load positions from the second vector index register until the second count is equal to the length of the second vector index register, wherein the second count is incremented for each load position from the second vector index register. The method of claim 7 , wherein the first operation comprises addition and the second operation comprises subtraction.

9. A computer system comprising: Vector processor; a first operand vector register of the vector processor configured to store a first operand vector; a second operand vector register of the vector processor configured to store a second operand vector; and The vector load storage unit of the vector processor is configured to: loading the first operand vector stored in the first operand vector register; loading the second operand vector stored in the second operand vector register, the vector processor being further configured to perform a conditional test operation on each element of the first operand vector and the second operand vector according to a count stored in a counter register and, in response to a result of the conditional test operation performed using a corresponding element, store a location identified by the count of the corresponding element until the count equals a vector length of at least one of the first operand vector or the second operand vector: responsive to a result indicating that the corresponding element satisfies the test in the conditional test operation, storing a position identified by the count of the corresponding element in a first vector index register; as well as responsive to the result indicating that the corresponding element does not satisfy the test in the conditional test operation, storing a position identified by the count of the corresponding element in a second vector index register; and incrementing the count in response to the count being less than the vector length of the at least one of the first operand vector or the second operand vector; The vector processor is further configured to: performing a first vector operation on a first element in the first operand vector and the second operand vector, the first element being identified by a position stored in the first vector index register; as well as A second vector operation is performed on a second element in the first operand vector and the second operand vector, the second element being identified by a position stored in the second vector index register.

10. The computer system according to claim 9, wherein the first operand vector is a first input operand vector, and the second operand vector is a second input operand vector; The vector load storage unit is configured to: loading a second count from a second counter register; and loads the storage locations of corresponding elements of the loaded first input operand vector and second input operand vector according to the second count from the first vector index register; and Wherein the vector processor is configured to perform a first operation on the corresponding elements of the loaded first and second input operand vectors according to the load locations from the first vector index register.

11. The computer system of claim 10, wherein the vector load store unit is configured to store a respective result of the first operation into an output operand vector register at a location corresponding to a respective load location from the first vector index register.

12. The computer system of claim 11, wherein the vector processor is configured to: continuing to perform the first operation on respective elements of the first input operand vector and the second input operand vector according to the respective load positions from the first vector index register and storing the respective results of the first operation in the output operand vector register at the positions corresponding to the respective load positions from the first vector index register until the second count equals the length of the first vector index register, wherein the second count is incremented for each load position from the first vector index register; and When the second count is equal to the length of the first vector index register, the second count is reset.

13. The computer system according to claim 12, in, After the second count is reset by the vector processor, the vector load store unit is configured to load storage locations of corresponding elements of the loaded first input operand vector and second input operand vector from the second vector index register according to the second count; and Wherein the vector processor is configured to perform a second operation on the corresponding elements of the loaded first and second input operand vectors according to the load locations from the second vector index register.

14. The computer system of claim 13 , wherein the vector processor is configured to continue to perform the second operation on corresponding elements of the loaded first and second input operand vectors according to a load position from the second vector index register, and store results of the second operation in the output operand vector register at corresponding positions matching the load position from the second vector index register until the second count equals the length of the second vector index register, wherein the second count is incremented for each load position from the second vector index register.

15. The computer system of claim 14, wherein the first operation comprises addition and the second operation comprises subtraction.

16. The computer system of claim 14, wherein the first vector index register and the second vector index register are parts of a combined vector index register, and wherein the vector load store unit is configured to: storing the location of each TRUE result of the conditional test operation at the topmost unfilled location in the combination vector index register; and A FALSE result is stored at a bottommost unfilled location in the combination vector index register for each FALSE result of the conditional test operation.

17. A vector processor comprising: a scalar operand register configured to store elements to be used as inputs to operations of the arithmetic logic unit ALU; a first operand vector register and a second operand vector register of the plurality of operand vector registers, Each operand vector register is configured to store an element of an operand vector to be used as an input to an operation of the ALU, The vector processor is configured to perform a first conditional test operation on each element of the first operand vector register and the second operand vector register according to a count stored in a counter register until the count stored in the counter register is equal to the vector length of at least one of the operand vectors, or to perform a second conditional test operation on each element stored in the scalar operand register and the first operand vector register according to the count stored in the counter register until the count stored in the counter register is equal to the vector length of the at least one of the operand vectors, and a first vector index register configured to store, for each result of the first conditional test operation or the second conditional test operation performed using a respective element indicating that the respective element satisfies a test in the first conditional test operation or the second conditional test operation, a position of the result identified by the count of the respective element; a second vector index register configured to store, for each result of the first conditional test operation or a second conditional test operation performed using the respective element that indicates that the respective element does not satisfy the test in the conditional test operation, a position identified by the count of the respective element; and incrementing the count stored in the counter register in response to the count being less than the vector length of at least one of the operand vectors; Each of the locations may be added to the effective address used to access the corresponding location in each operand vector register, and Each of the corresponding positions of each operand vector register includes an element of the operand vector to be operated on by the ALU.

18. The vector processor according to claim 17, wherein the first operand vector register comprises a first input operand vector, and the second operand vector register comprises a second input operand vector; and wherein the vector processor is configured to: loading a second count from a second counter register; loading storage locations of corresponding elements of the loaded first input operand vector and second input operand vector according to the second count from the first vector index register; loading storage locations of corresponding elements of the loaded first and second input operand vectors according to the second count from the second vector index register; and In parallel: performing a first operation on corresponding elements of the loaded first and second input operand vectors according to a load position from the first vector index register, and storing results of the first operation in an output operand vector register at corresponding positions matching the load position from the first vector index register; and A second operation is performed on corresponding elements of the loaded first and second input operand vectors according to the load position from the second vector index register, and results of the second operation are stored in the output operand vector register at corresponding positions matching the load position from the second vector index register.

19. The vector processor of claim 18, wherein the first operation comprises an addition and the second operation comprises a subtraction.