SYSTEM FOR DYNAMIC VLIW SUB-INSTRUCTION SELECTION FOR EXECUTION TIME PARALLELISM IN AN INDIRECT VLIW PROCESSOR

Abstract: Pipelined processing unit (100) with an instruction sequencer (101) having a random access memory (516) containing very long instruction words (VLIWS) and with n functional units capable of executing n operations in parallel. Each VLIW is composed of a plurality of short instruction words (SIWS) loaded and concatenated in each address or entry of the VLIW memory (VIM) (516) to form an indirect VLIW (iVLIW). Each SIW corresponds to a unique type of instruction associated with a unique functional unit. iVLIWs are executed via the executive-VLIW (XV) instruction. The XV1 instruction, by use of a mask field which can be modified each time the XVI instruction is executed, specifies which functional units are enabled or disabled during execution of the iVLIW. The VIM (516) can be further partitioned into separate memories (520, 522, 524, 526, 528) each associated with a function decode and execute unit (540, 542, 544, 546, 548). A second XV instruction, XV2, can independently address each functional units portion of the VIM (516).

Description: SYSTEM FOR DYNAMIC VLIW SUB-INSTRUCTION SELECTION FOR EXECUΗON ΗME PARALLELISM IN AN INDIRECT VLIW PROCESSOR Related Applications The present invention claims the benefit of U.S. Provisional Application Serial No. 60/067,511 entitled "Method and Apparatus For Dynamically Modifying Instructions in a Very Long Instruction Word Processor" and filed December 4, 1997. Field of the Invention The present invention relates generally to improvements in parallel processing, and more particularly to advantageous techniques for providing dynamic very long instruction word (VLIW) sub-instruction selection for execution time parallelism in an indirect VLIW processor. Background of the Invention In a VLIW processor, a typical problem is that it is difficult to make effective use of the full capabilities of the fixed length VLIWs available in the hardware. In previous designs, this design problem led to a very porous VLIW memory containing many No Operation (NOP) instructions within the VLIWs. Some machines have attempted to encode the NOPs to more fully utilize the VLIW memory space. One motivation of such attempts was to make better use of the costly VLIW memory included in these earlier processors. The encoded NOPs were typically assigned to each specific VLIW with no reuse of the VLIW possible in different areas of the program. There are other needs to be met by a VLIW parallel data processor. For example, it is desirable to pipeline operations in order to achieve a steady state flow of data for maximum throughput. Consider the case of matrix multiplication using a VLIW architecture with four short instruction words (SIWs) per VLIW. In the example of Fig. 1, a 4-element vector 2 and a 4x4 matrix 4 are multiplied. Given a processor with operands stored in a register file and VLIW execution units that operate on register file source data operands and deliver result data to the register file, it can be reasonably assumed that the vector elements are stored in data registers R20=ao, R21=a l5 R22=a 2 , and R23=a 3 , and the 4x4 matrix 4 is stored in a processor accessible memory. Fig. 2 illustrates how the entire operation is handled in a typical prior art approach. Each row in table 10 represents a unique short instruction word (SIW) or VLIW instruction with the program flow beginning at the top of the table and proceeding time-wise down the page. The Load operation is an indexed load that incrementally addresses memory to fetch the data element listed and load it into the specified register R0 or RI . The Add and Mpy instructions provide the function Rtarget = Rx Operation Ry, where Rtarget is the operand register closest to the function name and the source operands Rx and Ry are the second and third register specified. Each unique VLIW memory address is identified with a number in the first column. The table 10 of Fig. 2 shows that a minimum of seven VLIWs, each stored in a unique VLIW memory address, and three unique SIWs, are required to achieve the desired results in the prior art. It is important to note that of the seven VLIWs, three VLIWs, namely numbers 1, 2, and 7, use only two SIWs per VLIW, the other four use three SIWs per VLIW. When a four instruction slot VLIW contains only two SIWs, the other two slots contain NOP instructions. When the four instruction slot VLIW contains three SIWs, the other slot contains a single NOP. With a five instruction slot VLIW as will be described in greater detail below, even poorer usage of the VLIW memory results using prior art techniques. In the vector matrix example, a five slot VLIW will use 7*5=35 VLIW memory locations with 17 NOPs assuming the fifth slot is not used for this matrix multiplication example. The prior art approach results in a very porous VLIW memory with numerous NOP instructions. It is desirable to reduce the number of unique VLIW memory addresses to accomplish the same task since this makes more efficient use of the available hardware. It is also desirable to reduce duplicate instructions in the VLIW memory storage. This is an important consideration that allows a smaller VLIW memory to be designed into a processor thereby minimizing its cost. Further, if the same VLIW memory address could be shared by multiple sections of code and even multiple programs then the latency cost of loading the VLIW memories can be minimized, as compared to prior art approaches, and amortized over the multiple programs thereby improving overall performance. In addition, it is desirable to extend this concept into multiple Processing Elements (PEs) and to a controller Sequence Processor (SP) of a Single Instruction Multiple Data stream (SIMD) machine Summary of the Present Invention The present invention addresses the need to provide a compressed VLIW memory and the ability to reuse instruction components of VLIWs in a highly advantageous way. In one aspect, the present invention comprises a SIW fetch controller for reading instructions from the SIW memory (SIM), a VLIW memory (VIM) to store composed VLIWs at specified addresses, a VLIW controller for indirectly loading and reading instructions from the VIM, and instruction decode and execution units. VLIWs in the present invention are composed by loading and concatenating multiple SIWs in a VIM address prior to their execution. In a SIMD machine, the SIW fetch controller resides in the SIMD array controller SP which dispatches the fetched 32-bit instructions to the array PEs. The SP and the PEs include a VIM, a VIM controller, and instruction and decode execution units. The concepts discussed in this disclosure apply to both the indirect VLIW (iVLIW) apparatus and mechanism located in the SP controller and each PE in a multiple PE array SIMD machine. After at least one VLIW is loaded into VIM, it may be selected by an execute-VLIW (XV) instruction. There are two types of XV instructions described in this invention. The first one XVI provides sub-VLIW SIW selection across the slots at the same VIM address for execution time parallelism. The second XV2 provides sub-VLIW SIW selection with independently selectable SIWs from the available SIWs within each of the slots VIM sections for execution time parallelism. The XVI instruction is described first with an example demonstrating the advantages of this approach. The XV2 instruction description follows with an example demonstrating its inherent advantages. The XVI instruction causes the stored VLIW to be read out indirectly based upon address information that is computed from a VIM base address register and an immediate Offset value that is present in the XVI instruction. The XVI instruction contains Mask- Enable-bits which select the instructions from the read-out VLIW that are to be scheduled for execution. In a preferred ManArray embodiment there are 8-bit Mask-Enable-bits, one bit per execution unit, supporting up to 8-SIWs in a single VLIW. For the first implementation, 5 SIWs are preferably used. Due to the use of a VIM base register, Vb, unlimited VIM storage is possible. For each Vb base address, the XVI instruction preferably supports, in the first implementation, an 8-bit offset thereby allowing 256 VLIWs per Vb address. The preferred ManArray architecture specifies that up to 8 SIWs can be stored per VIM address and a minimum of eight Mask-Enable-bits, one per slot, are supported by the preferred embodiment. Also, because each VIM entry has a unique address, each VIM entry can be loaded, modified, executed, or disabled, independently. With eight SIW slots available per VIM entry, up to 255 unique combinations of SIW types can be stored in each entry, where, for example, SIW instruction types can include Store, Load, Arithmetic Logic Unit (ALU), Multiply Accumulate Unit (MAU), and Data Select Unit (DSU) instruction types. Each combination represents a unique indirect VLIW (iVLIW) available for XVI execution. Furthermore, when invoking the execution of SIWs from a previously loaded VIM entry via the XVI containing the 8-bit mask, up to 255 unique iVLIW operations can be invoked from that VIM entry alone. • The XV2 instruction provides the capability to remove duplicate instructions within groups of VLIWs within a slot specific section of the VIM. This capability provides optimum packing of instructions within the VIM thereby further optimizing its efficiency and minimizing its size for specific applications. A more complete understanding of the present invention, as well as other features and advantages of the invention will be apparent from the following Detailed Description and the accompanying drawings. Brief Description of the Drawings Fig. 1 illustrates the multiplication of a vector by a matrix; Fig. 2 illustrates a prior art approach to the multiplication operation of Fig. 1; Fig. 3 illustrates a ManArray 2x2 iVLIW processor showing the connections to a plurality of processing elements connected in an array topology for use in conjunction with the present invention; Fig. 4A illustrates an iVLIW data path with a VIM in accordance with a presently preferred embodiment of the present invention; Fig. 4B illustrates a presently preferred XVI, execute VLIW, instruction and syntax/operation details therefor; Fig. 4C illustrates a presently preferred LV2, load modify VLIW-2, instruction and syntax/operation details therefor; Fig. 4D illustrates a presently preferred XV2, execute VLIW, instruction and syntax/operation details therefor; Fig. 5 illustrates aspects of an iVLIW XVI pipeline with across slot compression utilized with an exemplary XVI instruction format in accordance with the present invention; Fig. 6 illustrates the approach of the present invention applied to the multiplication operation of Fig. 1; Fig. 7 illustrates dynamic cycle-by-cycle iVLIW instruction selection across instruction slots for execution time parallelism; Fig. 7 A illustrates program code using XVI instructions for the multiplication operation of Fig. 1; Fig. 8 illustrates aspects of an iVLIW XV2 pipeline with within slot compression utilizing an exemplary XV2 instruction format in accordance with the present invention; Fig. 9 illustrates dynamic cycle-by-cycle iVLIW instruction selection with within slot compression for execution time parallelism; and Fig. 10 illustrates program code using XV2 instructions for the multiplication operation of Fig. 1. Detailed Description In a preferred embodiment of the present invention shown in Fig. 3, a ManArray 2x2 iVLIW Single Instruction Multiple Data stream (SIMD) processor 100 containing a controller sequence processor (SP) combined with a processing element-0 (PEO) SP/PEO 101, as covered in more detail in co-pending Application Serial No. 09/169,072 entitled "Methods and Apparatus for Dynamic Merging an Array Controller with an Array Processing Element", and three additional PEs 151, 153, and 155 are utilized to implement the dynamic iVLIW modification techniques of the present invention. The SP/PEO 101 contains a fetch controller 103 to allow the fetching of SIWs from a 32-bit instruction memory 105. The fetch controller 103 provides the typical functions needed in a programmable processor such as a program counter (PC), a branch capability, digital signal processing loop operations, support for interrupts, and also provides the instruction memory control which could include an instruction cache if needed by an application. In addition, the SIW I-Fetch controller 103 dispatches 32-bit SIWs to the other PEs in the system by way of a 32-bit instruction bus 102. In this exemplary system, common elements are used throughout to simplify the explanation. It will be recognized that further implementations are not limited to this restriction. For example, the execution units 131 in the combined SP/PEO 101 can be separated into a set of execution units optimized for the control function, e.g. fixed point execution units, and the PEO as well as the other PEs can be optimized for a floating point application. For the purposes of this invention description, it is assumed that the execution units 131 are of the same type in the SP/PEO and the PEs. In a similar manner SP/PEO and the other PEs use a five instruction slot iVLIW architecture which contains a VIM memory 109 and an instruction decode and VIM controller function unit 107 which receives instructions as dispatched from the SP/PEO 's I-Fetch unit 103 and generates the VIM addresses-and-control signals 108 required to access the iVLIWs, identified by the letters SLAMD in block 109, stored in the VIM. The loading of the iVLIWs is described in more detail in co-pending patent application Serial No. 09/187,539 filed November 6, 1998 and entitled "Methods and Apparatus for Efficient Synchronous MIMD Operations with iVLIW PE-to-PE Communications". Also contained in the SP/PEO and the other PEs is a common PE configurable register file 127 which is described in more detail in co-pending patent application Serial No. 09/169,255 filed October 9, 1998 and entitled "Method and Apparatus for Dynamic Instruction Controlled Reconfiguration Register File with Extended Precision". Due to the combined nature of the SP/PEO 101, the data memory interface controller 125 must handle the data processing needs of both the SP controller, with SP data in memory 121, and PEO, with PEO data in memory 123. The SP/PEO controller 125 also is the source of the data that is sent over the 32-bit broadcast data bus 126. The other PEs, 151, 153, and 155 contain common physical data memory units 123', 123", and 123'" though the data stored in them is generally different as required by the local processing done on each PE. The interface to these PE data memories is also a common design in PEs 1, 2, and 3 and indicated by PE local memory and data bus interface logic 157, 157' and 157". Interconnecting the PEs for data transfer communications is the cluster switch 171 more completely described in co-pending patent application Serial No. 08/885,310 filed June 30, 1997 and entitled "Manifold Array Processor", Serial No. 08/949,122 filed October 10, 1997 and entitled "Methods and Apparatus for Manifold Array Processing", and Serial No. 09/169,256 filed October 9, 1998 and entitled "Methods and Apparatus for ManArray PE-to-PE Switch Control". The above noted applications are assigned to the assignee of the present invention and incorporated herein by reference in their entirety. The interface to a host processor, other peripheral devices, and/or external memory can be implemented in many ways. The primary mechanism shown for completeness is contained in the DMA control unit 181 that provides a scalable ManArray data bus 183 that connects to devices and interface units external to the ManArray core. The DMA control unit 181 provides the data flow and bus arbitration mechanisms needed for these external devices to interface to the ManArray core memories via bus 185. Fig. 4A shows an overall basic iVLIW data path 400 in which a fetched instruction is stored in an instruction register 401 which is connected to a VIM load and store control function unit 403. The VIM load and store control function provides interface signals to a VIM 405. The output of the VIM 405 is pipelined to an iVLIW register 407. One presently preferred XVI instruction 425 is shown in Fig. 4B. XVI instruction 425 is for 32-bit encoding as seen in encoding block 430 and has a presently preferred syntax/operation shown in syntax/operation block 435 as described further below. The XVI instruction 425 is one of the control group of instructions defined by the Group field bits 30 and 31 and is used to select VLIWs from VLIW (VIM) and execute individual instruction slots of the specified SP or PE, selectable by the SP/PE bit 29. The VIM address is computed as the sum of a base VIM address register Vb (V0 or VI) plus an unsigned 8-bit offset VIMOFFS shown in bits 0-7, the block of bits 431, of encoding block 430 of Fig. 4B. The VIM address must be in the valid range for the hardware configuration otherwise the operation of this instruction is undefined. Similarly, Fig. 4C shows a presently preferred LV2 instruction 455 for a load/modify VLIW-2 function. An encoding block 450 for 32-bit encoding and syntax/operation block 460 are shown. Fig,. 4D shows an XV2 instruction 475 having a 32-bit encoding block 470 and syntax/operation block 480. Dynamic SP and PE iVLIW Across Slot Compression Operations The XVI instruction is advantageously used to modify, enable/disable sub-iVLIW instructions, and indirectly execute iVLIW instructions in the SP and the PEs. The iVLIWs have been loaded into VIM by use of the LV instruction, also referred to as LV1 elsewhere in this application, which is described in more detail in previously mentioned co-pending application Serial No. 09/187,539. As illustrated in Fig. 5, each VIM 516 entry preferably consists of five SIW slots (one per execution unit) and associated with each SIW slot are additional state bits, of which only 5 are shown (one d-bit per slot). Included among the five execution units are a store unit 540 associated with VIM 516 store instruction slot 520, load unit 542 associated with load instruction slot 522, an arithmetic-logical unit (ALU) 544 associated with ALU instruction slot 524, a multiply-accumulate unit (MAU) 546 associated with an MAU instruction slot 526, and a data-select unit (DSU) 548 associated with a DSU instruction slot 528. The five state d-bits 521, 523, 525, 527, and 529 are LV-loaded disable bits for the instruction slots that indicate either: the SIW slot is available-for-execution or it is not- available-for-execution. A binary value suffices to distinguish between the two states. An instruction slot with its d-bit set to the not-available-for-execution state is interpreted as an NOP (no-operation) instruction by the execution unit. In addition, the appropriate d-bit for that functional slot position is loaded into bit-31 of that slot. Alternatively, the d-bits may be grouped and stored in a different location within a VIM address line while still maintaining the relationship between a d-bit and its associated execution unit and instruction slot within the iVLIW. Fig. 5 illustrates an iVLIW XVI pipeline 500, in which a received XVI instruction is loaded into an instruction register 1 (IRl) 510. The output of IRl is pre-decoded 512 early in the pipeline cycle prior to loading the VLIW Instruction Register 2 values (IR2) 514. Upon receipt of an XVI instruction in IRl 510, the VIM address 511 is calculated by use of the specified Vb registers, 501 or 502, as selected by the Vb signal 509 sourced from IRl 510 bit-9, and added by adder 504 to the offset value included in the XVI instruction via path 503. It is noted that by using bit-8 and bit-9 together up to 4 Vb registers can be specified. The resulting VIM address 507 is passed through multiplexer 508 to address the VIM 516. The iVLIW at the specified address is read out of the VIM 516 and passes through the multiplexers 530, 532, 534, 536, and 538, to the IR2 registers 514. As an alternative to minimize the read VIM 516 access timing critical path, the output of VIM 516 can be latched into a register whose output is passed through a multiplexer prior to the decode state logic. The enable mask bits, bits 10-17 of the XVI instruction stored in IRl 510, are distributed via path 537 to bit storage latches, S bit- 14 to S latch 550, L bit- 13 to L latch 552, A bit- 12 to A latch 554, M bit-1 1 to M latch 556, and D bit- 10 to D latch 558. These enable-mask-bits override the d-bit available-for-execution setting for each instruction slot for the XV execution cycle. In more detail, the Load VLIW-1 (LV1) instruction causes the d-bit setting to be loaded into each VIM slot. The d-bit per execution unit slot represents the enabled or disabled status of the slot position. An inactive state of this bit, for examine a "0", represents the disabled state and the active state of this bit, for example a "1", represents the enabled state. If the d-bit in a slot is enabled, it may be over-ridden by the XVI mask enable bit appropriate for that slot. If the d-bit in a slot is disabled, it can not be overridden by the XVI mask enable bit appropriate for that slot. In other words, a slot disabled by a LV1 instruction can not be reenabled by an XVI instruction. Conversly, a slot enabled by a LV1 instruction can be disabled or kept enabled by an XVI instruction. The simple logic to accomplish this is located in each functional unit. This capability is required for the functionality described herein and to efficiently support synchronous MIMD operations as described in more detail in co-pending application Serial No. 09/187,539 filed November 6, 1998. Alternatively, the latches 550-558 can be avoided if the timing path allows the override logic to be placed at the output of the VIM prior to IR2 clocking. In either case, the functional unit's decode and execute logic 540-548 either executes all instructions received from VIM or executes an NOP based upon the setting of the d-bits and the mask enable bits. For the XVI execution, the IR2MUX1 control signal 519 in conjunction with the pre-decode XVcl control signal 517 cause all the IR2 multiplexers, 530, 532, 534, 536, and 538, to select the VIM output paths, 541, 543, 545, 547, and 549. The mask enable bits are present at their latch inputs. At the end of the pre-decode cycle, the VLIW IR2 514 and the mask enable bit latches are clocked and their outputs become present at the inputs of the functional units. At this point, the five individual decode and execution stages of the pipeline, 540, 542, 544, 546, and 548, are completed, executing the instruction or an NOP, in synchrony providing the iVLlW parallel execution performance. To allow a non-XV single 32-bit functional instruction to execute by itself in the PE or SP, the bypass VIM path 535 is shown. For example, when a simplex ADD instruction is received into IRl 510 for parallel array execution, the pre-decode function unit 512 generates the IR2MUX1 519 control signal, which in conjunction with an ADD instruction pre-decode signal, causes the ALU multiplexer 534 to select the bypass path 535. Since in this case there is no XV instruction in execution, the enable-mask-bits are ignored by the functional unit logic. Any combination of individual instruction slots may be executed via the execute slot parameter Ε={ SLAMD} 1 , where S=Store Unit (SU), L=Load Unit (LU), A=Arithmetic Logic Unit (ALU), M=Multiply-Accumulate Unit (MAU), and D=Data Select Unit (DSU). A blank 'E- parameter does not execute any slots. The Vx bit-24 specifies if this XVI overrides the LV UAF setting. Vx=0 means do not override LV UAF setting and Vx=l means override the LV UAF setting with the one specified in this XVl's UAF field bits 22 and 23. The Unit Affecting Flags (UAF) parameter 'F=[AMDN]' overrides the UAF specified for the VLIW when it was loaded via the LV instruction. The override selects which arithmetic instruction slot (A=ALU, M=MAU, D=DSU) or none (N=NONE) is allowed to set condition flags for this execution of the VLIW. The override does not affect the UAF setting specified via the LV instruction. A blank 'F- selects the UAF specified when the VLIW was loaded. Condition Flags are set by the individual simplex instruction in the slot specified by the setting of 'F- parameter from the original LV instruction or as overridden by a 'F=[AMD]' parameter in the XVI instruction. Condition flags are not affected when T=N'. The XVI operation takes one execute cycle to complete, though pipeline considerations must be taken into account based upon the individual simplex instructions in each of the slots that are executed. Overall operation of the present invention may be better understood by examining its application to the exemplary problem presented in the discussion of the prior art. In the table 600 of Fig. 6, each row represents an iVLIW. Each unique VIM address 610 is identified with a number in the first column. The boxed table entries represent SIWs that are masked (i.e. disabled) by the XVI instruction during execution. In table 600 of Fig. 6, the shaded iVLIWs 612, 614, 616 and 618 at VIM address-0 highlight four occasions in which the SIWs stored at VIM address-0 are invoked by the XVI instruction, each time with a different mask. The first time the instructions are invoked, only the Load Unit is allowed to execute and the Multiply-Accumulate and the Store Units are masked out by the XVI instruction. The second time the VIM address-0 iVLIW instructions are invoked, the Load and Multiply- Accumulate Units are allowed to execute and the Store Unit is masked out by the XVI instruction. The third time, all three units are allowed to execute. Finally, the fourth time the instructions stored in address-0 iVLIW are invoked, only the Store Unit is allowed to execute and the Load and Multiply-Accumulate Units are masked out. In the 2x2 ManArray 100 of Fig. 3, four independent vector * matrix operations, on independent local PE data stored in each PEs local data memories, will be occurring in parallel and in synchronism while maintaining a single thread of control with the dispatching of the 32-bit XVI instructions to each PE. The iVLIWs identified in this example are the same in each PE with the operands accessed from each PE's local register file and local data memory. Fig. 7 illustrates the Fig. 6 example's four iVLIWs as stored in VIM addresses 0-3 710 and the cycle-by-cycle dispatched instruction sequence 720 to the decode-and-execution units. The dispatched instruction sequence 720 illustrates the reuse and cycle-by-cycle redefinition of the iVLIWs that are executed in parallel at execution time. This redefinition is a selecting of the SIWs stored in an iVLIW at a specific VIM address. For example, iVLIW- 0 is shown used in instruction execution cycles 1, 3, and 7 with different groupings of the iVLIW-0's SIWs. In cycle-1, only the Load unit instruction is used. In cycle-3 the Load and MAU units are used and in cycle-7, the Store, Load, and MAU units are used. Fig. 7 illustrates how the present invention accomplishes a significant saving in the number of unique VLIW memory entries required by a program, by effectively "packing" several VLIW operations into a single VLIW memory entry. Thus, with the present invention, multiple programs can share a single VLIW memory entry, by storing multiple iVLIWs at the same VIM address. The example also demonstrates the use of the invention to build up and tear down software pipelines. Furthermore, the size of the iVLIW memory in a parallel processor can be kept from becoming prohibitively expensive to build. Fig. 7A illustrates exemplary program code 730 using the XVI instruction to accomplish the vector* matrix multiplication of Fig. 1 on the 2x2 ManArray 100 of Fig. 3. Dynamic SP and PE iVLIW Within Slot Compression Operations For the within slot compression mechanism, the VIM is divided up into separate VIM sections each associated with the functional decode-and-execute units. Each of the VIMs' address maps are divided into multiple 4-bit addressable sections as governed by the offset field included in a second version of the execute iVLIW instruction, XV2, with a separate offset that can be specified for each VIM slot section. This VIM configuration and XV2 addressing option provide the ability to independently select instructions within each VIM slot 4-bit address range. By providing this ability, duplicate SIWs within the 16 addressable iVLIW range can be eliminated providing greater packing of SIWs within the composite VIM. Of course, many variations of addressing options can be envisioned utilizing the inventive techniques to allow the independent selection of SIWs within a partitioned VTM but one is described further below to illustrate various aspects of the within-slot-compression in accordance with the present invention. The XV2 instruction is similar to the XVI instruction in that it is used to modify, enable/disable sub-iVLIW instructions, and indirectly execute iVLIW instructions in the SP and PEs. It does so, however, in a different way than the XVI instruction. For the XV2 instruction, it is still assumed that the iVLIWs have been loaded into this new partitioned VIM by use of a new version of the Load VLIW instruction, LV2 455 shown in Fig. 4C. The LV2 encoding block 450 consists of a CtrlOp field, bits 25-28, that represent the LV2 instruction opcode, a load instruction bit-23 that specifies if at least one instruction is to be loaded or if only the disable d-bit for the specified address is to be loaded. Bit-22 is the disable d-bit that is loaded. Bits 18-21 specify that up to 16 instructions are to be loaded in the specified functional unit's VIM, bits 15-17, beginning at the address specified by the Vb register address, bit-9, plus the VIMOFFS offset address, bits 0-7. The syntax/operation details are shown in block 460. The XV2 instruction 475 is shown in Fig. 4D. The encoding format is shown in encoding block 470 with new bit fields as follows. The UAF field bits 23 and 24 are not optional on XV2 and must be specified with each XV2 use. The VIM base register selection Vb is bit 20 and the five Offset fields are Store VIM offset (SOFS) bits 16- 19, Load VIM offset (LOFS) bits 12-15, ALU VIM offset (AOFS) bits 8-11, MAU VIM offset (MOFS) bits 4-7, and DSU VIM offset (DOFS) bits 0-3. The syntax/operation is shown in block 480. Referring to Fig. 8 which illustrates aspects of an iVLIW XV2 pipeline 800, VIM 816 consists of multiple independent memory units each associated with their functional decode and execute units. Independent addressing logic is provided for each slot VIM. As illustrated in Fig. 8 each VIM entry preferably consists of five SIW slots (one per execution unit) and associated with each SIW slot are additional state bits, of which 5 are shown (one d- bit per slot). Included among the five execution units are a store unit 840 associated with store instruction VIM 820, load unit 842 associated with load instruction VIM 822, an arithmetic-logical unit (ALU) 844 associated with an ALU instruction VIM 824, a multiply- accumulate unit (MAU) 846 associated with MAU instruction VIM 826, and a data-select unit (DSU) 848 associated with DSU instruction VIM 828. The Fig. 8 VIM address adder functional blocks, as exemplified by ALU VIM address adder 804, are different than the adder functional block 504 of Fig. 5 in order to support the VIM address increment capability required by the Load VLIW-2 (LV2) Instruction of Fig. 4C as described in Syntax/Operation block 460. This capability allows the instructions following the LV2 instruction to be loaded at: • (V[01 ]+VIMOFFS)[Unit\TM] <- 1 st Instruction following LV2 • (V[01]+VIMOFFS+l)[UnitVIM] <- 2 nd Instruction following LV2 • (V[01 ]+VIMOFFS)+InstrCnt)[UnitVIM] <- 1 st (InstrCnt) th Instruction following LV2 The instruction count InstrCnt is a binary coded number, 0 thru F, that represents from 1 to 16 instructions thta can be loaded into up to 16 consecutive Unit VIM locations. The five state d-bits 821, 823, 825, 827, and 829 are LV-loaded disable bits for the instruction slots that indicate either: the SIW slot is available-for-execution or it is not- available-for-execution. A binary value suffices to distinguish between the two states. An instruction slot with its d-bit set to the not-available-for-execution state is interpreted as an NOP (no-operation) instruction by the execution unit. In addition, the appropriate d-bit for that functional slot position is loaded into bit-31 of that slot. The operation of the iVLIW XV2 pipeline 800 is as follows. A received XV2 instruction is loaded into instruction register 1 (IRl) 810. The output of IRl is pre-decoded by pre-decode function unit 812 early in the pipeline cycle prior to loading the VLIW instruction register 2 values in IR2 814. Upon receipt of an XV2 instruction in IRl 810, multiple VIM addresses are calculated in parallel. The calculations differ for each VIM slot section due to each having its own offset value as set by the XV2 instruction. Each Vim slot calculation is of the form Vb+0extend{unitOFS[4]}where Vb represents one of two VIM address registers, and Oextend aligns the 4-bit (unitOFS[4]) value with the extent of Vb. For example, the ALU VIM's address 811 is calculated by Vb+0extend{AOFS[4]}, where the Vb value is sourced from either V0 or VI as selected by the Vb field, bit-20, of IRl . Addition is accomplished by adder 804. The AOFS[4]=IRl bits8-l 1 are connected to adder 804 with the adder 804 output 807 being passed through multiplexer 808 to create the ALU VIM slot address 811. The zero extend logic is not shown for clarity. The ability to mask an entry with XV2 can be achieved without the use of the enable mask bits that were described in connection with the discussion of XVI operation. If a programmer desires the ability to mask an entry, he or she must plan for it in advance and ensure that within the group of 16 addresses, provided by the offset field, at least one of the SIWs is marked as disabled by use of the disable d-bit. For the particular iVLIW that is to be executed with a specific slot masked off, the unitOFS offset for that unit's VIM is used to select the disabled SIW previously stored. If no slots need to be disabled, full use of the 16 addresses are available for "enabled" SIWs. If only one slot is desired to be disabled, only that slot's VIM need contain the disabled instruction. Once the VIM addresses are selected, the appropriate SIWs are read out and sent to their decode and execution units. Since in XV2 operation there is no need for the enable-mask-bits, there are no additional state bit latches required for input to the decode and execution units. Another difference between XVI and the XV2 operation is that for XV2, the UAF field is always selected. The XV2 operation takes one execute cycle to complete, though pipeline considerations must be taken into account based upon the individual simplex instructions in each of the slots that are executed. The present invention may be better understood by examining the application of the XV2 instruction to the exemplary problem in the discussion of the prior art. Fig. 9 illustrates the iVLIWs required using the XV2 approach. Each decode and execution unit is associated with its own VIM each with different storage requirements for iVLIW usage. This is also depicted in Fig. 8 wherein a different address range per functinal unit VIM is shown; (0-(A- 1)) store VIM 820, (O-(B-l)) load VIM 822, (O-(C-l)) ALU VIM 824, (O-(D-l)) MAU VIM 826, and (O-(E-l)) DSU VIM 828. In Fig. 9, composite VIM 910 shows the five decode and execution units' VIMs. The storage requirements for this composite VIM 910 are as follows: the Store VIM requires only 2 locations, the Load VIM uses 3 locations, the ALU VIM uses 4 locations, the MAU VIM uses 5 locations, and the DSU VIM only needs one location. Only one set of disabled locations are used in each VIM which is shown by convention to be in VIM address 0 in each of the unit's VIMs. Dispatched instruction sequence 920 illustrates the reuse and cycle-by-cycle redefinition of the iVLIWs that are executed in parallel at execution time. This redefinition is a selecting of the SIWs stored in the units VIMs, but not all at the same VIM address as is done with XVI. For example, in instruction execution cycle-4 of sequence 920 the store SIW is accessed from address 0 in the Store VIM, a disabled d-bit instruction, the Load SIW is accessed from address 2 in the Load VIM, a Load RI, Data instruction, the ALU SIW is accessed from address 3 in the ALU VIM, an Add R9,R5,R6 instruction, the MAU SIW is accessed from address 3 in the MAU VIM, a Mpy R5,R0,R22 instruction, and the DSU SIW is accessed from address 0 in the DSU VIM, a disabled d-bit instruction. Fig. 10 illustrates program code 1000 for using XV2 instructions to accomplish the vector * matrix multiplication of Fig. 1 on the 2x2 ManArray 600 of Fig. 3. Specifically, in the 2x2 ManArray of Fig. 3, four independent vector * matrix operations, on independent local PE data stored in each PE's local data memories, will be occurring in parallel and in synchronism while maintaining a single thread of control with the dispatching of the 32-bit XV2 instructions to each PE. The iVLIWs identified in this exemplary description are the same in each PE with the operands accessed from each PE's local register file and local data memory. In comparing the XV2 approach with the XVI approach, it is observed that only 15 locations are used in the composite VIM 910 of the XV2 approach illustrated in Fig. 9 and 20 locations are used in the VIM 710 of the XVI approach illustrated in Fig. 7. Both approaches are significantly better than the prior art in their utilization of VLIW memory storage. Typically, 35 locations would have been required in a five slot VLIW prior art system. It is also noted that for cost sensitive applications, the XV2 approach allows each functional unit's VIM to be cost optimized to the application. While the present invention has been disclosed in the context of presently preferred methods and apparatus for carrying out the invention, various alternative implementations and variations will be readily apparent to those of ordinary skill in the art.

Claims: We claim: 1. An indirect very long instruction word (VLIW) processor comprising a plurality of execution units capable of performing a plurality of distinct operations in parallel; a VLIW memory (VIM) for storing VLIWs; and an addressing mechanism for providing access to each memory entry in VIM, said memory entries each containing at least one instruction slot associated with a unique execution unit. 2. The indirect VLIW processor of claim 1 further comprising at least one state bit associated with each instruction slot, said state bit designating whether an instruction is available-for-execution or not-available-for-execution. 3. The indirect VLIW processor of claim 1 further comprising an instruction to execute VLIWs stored in VIM, said instruction containing a field to specify a VIM address, said instruction containing at least one mask enable bit. 4. The indirect VLIW processor of claim 1 wherein said plurality of execution units comprise a store unit, a load unit, an arithmetic-logic unit, a multiply-accumulate unit and a data-select unit. 5. The indirect VLIW processor of claim 1 wherein said memory units each contain a store instruction slot, a load instruction slot, an arithmetic-logic instruction slot, a multiply-accumulate instruction slot, and a data-select unit slot. 6. The indirect VLIW procesor of claim 1 wherein said addressing mechanism comprises a base VIM address register for storing a base VIM address and an adder for adding the base VIM address and an offset (VIMOFF) to produce a VIM address. 7. The indirect VLIW processor of claim 3 wherein said instruction contains at least one mask enable bit per instruction slot and further comprising at least one storage latch for storing each mask enable bit. 8. The indirect VLIW processor of claim 7 further comprising at least one state bit associated with each instruction slot, said state bit designating whether an instruction is available-for-execution or not-available-for-execution, and an execution unit decoder which determines from the stored mask enable bit for the at least one storage latch and said state bit for its associated instruction slot whether an instruction is to execute or not. 9. An indirect very long instruction word (VLIW) processor comprising • a plurality of execution units capable of performing a plurality of distinct operations in parallel; a VLIW memory (VIM) for storing VLIWs, said VIM being divided into separate VIM sections each of which is associated with one of said plurality of execution units, said VIM sections storing instructions in each of the memory entry slots; and an addressing mechanism for each of said VIM sections providing access to each memory entry, in it associated VIM section independently. 10. The indirect VLIW processor of claim 1 further comprising at least one state bit associated with each VIM section, said state bit designating whether an instruction is available-for-execution or not-available-for-execution. 11. The indirect VLIW processor of claim 1 further comprising an instruction to execute VLIWs stored in VIM, said instruction containing a plurality of offset fields to specify a VIM address with one offset field per execution unit VIM. 12. The indirect VLIW processor of claim 11 wherein the plurality of execution units comprise a store unit, a load unit, an arithmetic-logic unit, a multiply-accumulate unit and a data-select unit. 13. The indirect VLIW processor of claim 9 wherein said addressing mechansim comprises a base VIM address register for storing a base VIM address and an adder for adding the base VIM address and an offset to produce a VIM address. 14. The indirect VLIW processor of claim 9 wherein said addressing mechanism comprises a base VIM address register for storing a base VIM address, an adder for adding the base VIM address and an offset to produce a address, and an incrementing mechanism for loading instructions into the VIM in multiple VIM addresses. 15. A single instruction multiple data stream (SIMD) processor with a sequence processor (SP) and a plurality of processing elements (PEs), the SP and each PE comprising: a plurality of execution units capable of performing a plurality of distinct operations in parallel; a very long instruction word (VLIW) memory (VIM) for storing VLIWs; and an addressing mechanism for said VIM providing access to each memory entry in VIM, said memory entries each containing at least one instruction slot associated with a unique execution unit and at least one state bit associated with each instruction slot, said state bit acting as a load-indicator bit for the instruction slot. 16. The SIMD processor of claim 15 further comprising: an instruction to execute VLIWs stored in VIM, said instruction containing a field to specify a VIM address, said instruction containing at least one mask bit to control the enabling or disabling of an execution unit at VLIW-instruction-execution-time. 17. The SIMD processor of claim 15 in which a plurality of VLIW operations are packed into a single VLIW memory entry so that a plurality of programs running simultaneously on the PEs can share a single VLIW memory entry. 18. A single instruction multiple data stream (SIMD) processor with a sequence processor (SP) and a plurality of processing elements (PEs), the SP and each PE comprising: a plurality of execution units capable of performing a plurality of distinct operations in parallel; a very long instruction word (VLIW) memory (VIM) for storing VLIWs, said VIM being divided into separate VIM sections each of which is associated with one of said plurality of execution unitS, said VIM sections storing instructions in each of the memory entry slots; and an addressing mechanism for each of said VIM sections providing access to each memory entry, in it associated VIM section independently. 19. The SMID processor of claim 18 further comprising at least one state bit associated with each VIM section, said state bit designating whether an instruction is available-for-execution or not-available-for-execution. 20. The SMID processor of claim 18 further comprising an instruction to execute VLIWs stored in VIM, said instruction containing a plurality of offset fields to specify a VIM address with one offset field per execution unit VIM. 21. The SMID processor of claim 18 wherein the plurality of execution units comprise a store unit, a load unit, an arithmetic-logic unit, a multiply-accumulate unit and a data-select unit. 22. The SMID processor of claim 18 wherein said addressing mechansim comprises a base VIM address register for storing a base VIM address and an adder for adding the base VIM address and an offset to produce a VIM address.

Inventors: BARRY EDWIN F, PECHANEX GERALD G, REVILLA JUAN GUILLERMO, BARRY, EDWIN, F., PECHANEX, GERALD, G., REVILLA, JUAN, GUILLERMO
Applicants: BOPS INC, BOPS INCORPORATED
Application year: 1999
Main classification: G06F15
IPC codes: G06F9, G06F15