STREAMING VECTOR PROCESSOR WITH RECONFIGURABLE INTERCONNECTION SWITCH

Abstract
A re-configurable, streaming vector processor (100) is provided which includes a number of function units (102), each having one or more inputs for receiving data values and an output for providing a data value, a re-configurable interconnection switch (104) and a micro-sequencer (118). The re-configurable interconnection switch (104) includes one or more links, each link operable to couple an output of a function unit (102) to an input of a function unit (102) as directed by the micro-sequencer (118). The vector processor may also include one or more input-stream units (122) for retrieving data from memory. Each input-stream unit is directed by a host processor and has a defined interface (116) to the host processor. The vector processor also includes one or more output-stream units (124) for writing data to memory or to the host processor. The defined interface of the input-stream and output-stream units forms a first part of the programming model. The instructions stored in a memory, in the sequence that direct the re-configurable interconnection switch, form a second part of the programming model.
Description


FIELD OF THE INVENTION

[0002] This invention relates generally to the field of computer processors. More particularly, this invention relates to a re-configurable, streaming vector processor.



BACKGROUND OF THE INVENTION

[0003] Many new applications being planned for mobile devices (multimedia, graphics, image compression/decompression, etc.) involve a high percentage of streaming vector computations. The computation rate of these applications often exceeds that which the best general purpose CPU's can deliver. Therefore, it is desirable to find a means to improve the performance of the computation engine present in such devices to meet the computational requirements of these new applications.


[0004] Simultaneously, the nature of these new applications is that the standards and the best algorithms for complying with the standards are constantly changing, requiring a solution that is programmable and easy to program. Moreover, time to market pressures are increasing. One method for addressing this issue is to increase the reuse of previous investments in software and hardware. Reuse of hardware across multiple products is best promoted through programmability. Reuse of software is promoted through the use of a consistent programming model across multiple implementations of a device so that binary compatibility is maintained.


[0005] One attempt to satisfy this need is the use of hardware accelerators. These fall short of solving the problem because they have limited reprogramming capability. Those hardware accelerators that are not fixed in function allow only for changes in the parameters of the functions they execute rather than a change in the type or ordering of functions.


[0006] Programmable solutions exist in the form of vector processors, digital signal processors, SIMD processors and VLIW processors. These solutions fall short due to limitations in their programming models which cause them to be difficult to program and make it difficult to maintain a consistent programming model across all generations of hardware. Limitations in their programming models include: programmer visibility of the data-path pipeline, memory width and latency, data alignment in memory, and explicit resource dependencies.







BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as the preferred mode of use, and further objects and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawing(s), wherein:


[0008]
FIG. 1 is a diagrammatic representation of an embodiment of a re-configurable streaming vector processor of the present invention.


[0009]
FIG. 2 is a data-flow graph of an exemplary iterative computation.


[0010]
FIG. 3 is a flow chart of a process for programming the vector processor of the present invention.


[0011]
FIG. 4 is a flow chart of a process of programming a host processor to operate with the vector processor of the present invention.







DETAILED DESCRIPTION OF THE INVENTION

[0012] While this invention is susceptible of embodiment in many different forms, there is shown in the drawings and will herein be described in detail one or more specific embodiments, with the understanding that the present disclosure is to be considered as exemplary of the principles of the invention and not intended to limit the invention to the specific embodiments shown and described. In the description below, like reference numerals are used to describe the same, similar or corresponding parts in the several Views of the drawings.


[0013] The Re-configurable Streaming Vector Processor (RSVP) of the present invention is a coprocessor that performs vector operations—i.e. a set of identical operations on a sequence of data elements. It is designed to enhance the performance of an embedded general-purpose processor (the host processor) by performing high speed vector operations. In the RSVP programming model, the specification of the vector operation is split into two components: access and computation.


[0014] In one embodiment of the invention, a re-configurable, streaming vector processor is provided which includes a number of function units, each having one or more inputs for receiving data values and an output for providing a data value, a re-configurable interconnection-switch and a micro-sequencer. The re-configurable interconnection-switch includes one or more links, each link operable to couple an output of a function unit to an input of a function unit as directed by the micro-sequencer. The vector processor also includes one or more input-stream units for retrieving data from memory. The input-stream units are directed by a host processor and have a defined interface to the host processor. The vector processor also includes one or more output-stream units for writing data to memory, also with a defined interface to the host processor.


[0015] In a further embodiment, the re-configurable interconnection-switch includes a memory for storing intermediate data values.


[0016] In the preferred embodiment, the defined interface of the input-stream unit forms a first part of the programming model. The instructions, which are stored in a memory in the sequence that directs the re-configurable interconnection-switch, form a second part of the programming model.


[0017] An exemplary embodiment of RVSP hardware 100 is shown in FIG. 1. Referring to FIG. 1, the outputs and inputs of a number of function units 102 are interconnected via a re-configurable interconnection switch 104. The function units may include a multiplier 106, an adder 108, a logic unit 110 and a shifter 112. Other function units may be included, and multiple function units of a particular type may be included. The outputs from the function units may be single registers or pipeline registers. The function units may support mutiple independent operations. For example, the multiplier may have a 128-bit input and a 128-bit output and be able to perform two 32×32 to 64 or four 16×16 to 32-bit multiplies, or any combination whose aggregate does not exceed 128 bits in or 128 bits out. The hardware also includes one or more accumulators 114. In the preferred embodiment, the accumulators act as both accumulators and storage registers, and are interfaced both to the interconnection switch 104 and to an external interface 116. The external interface 116 enables the RSVP to link with a host processor and allows the host processor to access the accumulators and other parts of the RSVP. The function units 102 and the re-configurable interconnection switch 104 define the data-path for the RSVP. The function units and the re-configurable interconnection switch 104 are linked to a micro-sequencer 118 that includes a memory 120, preferably a cache, for storing a program of instructions that describes the implementation specific description of a data-flow graph of the desired vector computation. At each cycle of the processor clock, the micro-sequencer produces control words that configure the links in the interconnection switch and drive the function units. Storage and presentation of scalar values and tunnel node functionality is provided by constant unit 120. The scalar values and tunnel initialization values may be loaded by the host processor or by the program of instructions. In operation, input data values are provided to the interconnection switch 104 by one or more input-stream units 122 (only one unit is shown the figure). Each input-stream unit 122 is controlled by a set of parameters describing the allocation of data in memory. This set of parameters is provided by the host processor, to which the input-stream unit is connected via external interface 116. Each output-stream unit 124 (only one unit is shown the figure) is similarly controlled by the host processor and is operable to transfer data from the re-configurable interconnection switch 104 to external memory. The input-stream unit 122 and the output-stream unit 124 are linked to the micro-sequencer 118 that synchronizes data flow.


[0018] The architecture of the exemplary RSVP described above facilitates a separation of the operations of vector access and vector computation.


[0019] Vector access, performed by an input or output stream unit, consists of describing the location, shape, and type of each input and output vector that is part of the vector operation. In the preferred embodiment, these properties are described through two or more of the parameters:


[0020] 1. Vector address—the starting address in memory of the next vector element.


[0021] 2. Stride—the signed increment from one element to the next.


[0022] 3. Span—the number of strides before skipping.


[0023] 4. Skip—the signed increment after counting a span of elements


[0024] 5. Size—the size of each data element (e.g. 1, 2 or 4 bytes).


[0025] In addition to the input and output vectors, the vector processor may include a number of scalar and accumulator registers whose initial values may be specified by the programmer. These registers are used within the vector computation. In the case of the accumulators, the values of the registers are allowed to change during the computation and may be accessed for later use. The vector access portion of the programming model is described in the programming language used for the host processor and is executed on the host.


[0026] Vector computation consists of the partially ordered set of operators to be applied to the elements of the input vectors, scalar registers, and accumulators to derive each output vector element. In the programming model of the present invention, this is done via a linearized representation of a data-flow graph of the computation. In a data-flow graph, each node in the graph is denoted using a node descriptor that specifies the operation to be performed by the node and the nodes from which its input data are obtained. There is no explicit naming of registers to pass data between operators as in other CPU's. An example computation has the C language description:


[0027] void quant (short *out, short *in, int n, short qp)
1{long rq, b, c;rq = ( (1 < < 16) + qp)/(qp < < 1);b = qp − !(qp & 1);while(- -n > 0){c = *in++;if(c < 0) c + = b;else if(c > 0) c − = b;*out++ = (c * rq)/(1 < < 16);}}


[0028] A corresponding data-flow graph is shown in FIG. 2. Referring to FIG. 2, a vector v1 is loaded at block 202. The sign of the vector is taken at node 204. The scalar values s2 and s1 are loaded at blocks 206 and 208, respectively. The immediate shift value 16 is load at block 210. At node 212 the vector v1 is multiplied by the scalar s2. The result of this multiplication is subtracted from v1 at node 214. The result of the subtraction is multiplied by the scalar s1 at node 216 and then right-shifted by 16 at node 218. The final vector result is stored as v0 at block 220.


[0029] A linearized form of the data flow graph is given by:
2Q1:vld.s16(v1)// c = *in++ ;Q2:vsign.s16Q1Q3:vscalars2// s2 is bQ4:vscalars1// s1 is rqQ5:vimm16Q6:vmul.s16Q2, Q3// if (c < 0) c+ = b;Q7:vsub.s16Q1, Q6// else if (c > 0) c− = b;Q8:vmul.s32Q7, Q4// c * = rq;Q9:vasr0.s16Q8, Q5// *out++ = c/(1 < < 16) ;


[0030] This exemplary linearized flow form uses the functional operations:


[0031] vld.s16—load the next data element from of vector of 16-bit data values


[0032] vsign.s16—calculate the sign of the data value


[0033] vscalar—load a scalar value


[0034] vmul.s16—multiply two 16-bit data values


[0035] vmul.s32—multiply two 32-data values


[0036] vsub.s16—subtract two 16-bit data values


[0037] vasr0.s16—arithmetic shift right of a 16-bit data values


[0038] The function unit preferably performs a variety of other functional operations including vector element addition (vadd) and accumulation (vadda). Prior to execution, the linearized graph is scheduled onto the RSVP data path. The data path is re-configurable in each clock cycle. The function units may be aggregated, that is subsets of them can be combined to form larger function units. The function unit interconnection allows for arbitrary pipelining of the function units.


[0039] The RSVP promotes the goals of high performance and quick time to market through its programming model. Since it is a coprocessor, the RSVP preferably uses a single-core programming model. Dual-core solutions, such as that used in general purpose CPU/DSP combinations, tend to be much more difficult to program. This is because with these types of solutions, the programmer must employ two different sets of programming tools and must explicitly deal with the synchronization between the CPU and DSP.


[0040] Within the programming model of the present invention, the vector access description is separate from the vector computation description. Thus, the programmer does not have to deal with intermingling of the two concerns. Because the vector access is described only in terms of five parameters, the programmer may avoid dealing with issues of data alignment and padding, memory bus width or memory latency. The underlying vector access hardware handles these issues. In this way, the vector access description remains constant, no matter the implementation of the memory subsystem or vector access hardware. Not only does this simplify the programmer's task, but it also promotes binary code compatibility in that the RSVP binary code does not have to be altered to reflect changes in those implementations.


[0041] The vector computation description, being in the form of a data-flow graph, contains no information specific to the implementation of the RSVP data path. Excepting use of accumulators and vector stream units (VSUs), the RSVP is free of any resource dependencies. In particular, it lacks the explicit naming of registers to pass data between operators. This removes the burden from the scheduler, making it easier for the scheduler to achieve an optimum schedule. As a result, the data path can change from a scalar data path, to one that is super-scalar, VLIW or SIMD-like, transparent to the programmer and without a change in the RSVP binary code.


[0042] The separation of the vector access description and the vector computation description in the programming model is illustrated in FIG. 3 and FIG. 4. FIG. 3 shows a flow chart of the method for generating code for the RSVP. Following start block 302, a dataflow graph of the computation is specified at block 304. From the dataflow graph a linear graph form of the computation is generated at block 306. The generation of the linear graph form may be performed either manually or automatically by a computer program. In one embodiment, the computer program provides a graphical user interface to the user, facilitating the entry of the dataflow graph. The linear graph form generated at block 306 is supplied to a scheduler at block 308. The scheduler is a computer program that orders the functional operations for efficient use of the RSVP resources. Once the scheduling is complete, binary code for the RSVP is generated at block 310 and the process terminates at block 312. Notice that this process does not take account of vector access issues such as data alignment and padding, memory bus width or memory latency. These issues are dealt with by the hardware. The data access is specified in the host processor. The programming process for the host processor is shown in FIG. 4. Referring to FIG. 4, following start block 402, the structure of the data in memory is specified at block 404. At block 406, the associated data access parameters (starting address, stride, span, skip and size) are specified. These parameters will be passed to the input-streaming unit of the RSVP during operation. At block 408, the remainder of the host processor code is generated and the process terminates at block 410. Hence, the host process specifies vector access, but is independent from vector computation.


[0043] The RSVP hardware takes advantage of several aspects of the programming model in order to improve performance. Due to the separation of vector access and computation, the hardware for each operates asynchronously with respect to the other. As a result, the vector access hardware can proceed ahead of the computation, fetching data before it is needed and thus hiding at least a portion of the memory latency.


[0044] The vector access description is succinct enough that all information is held in a small number of registers in the access hardware. These registers are accessible to the host processor. Likewise, RSVP data flow graphs are architecturally limited to a fixed number of nodes (256, for example), such that the RSVP micro-sequencer memory is large enough to hold the entire linearized form of the data flow graph. The advantage of this approach is that the hardware never needs to fetch instructions to determine how to perform the address calculations or the vector computation. This eliminates instruction fetch from the memory bandwidth required to service the RSVP computation.


[0045] Since the vector computation is specified as a data flow graph, containing few resource dependencies, the RSVP data path is unlike the data path of other CPUs. Most DSP, SIMD, VLIW and vector processor devices are unable to connect the function units of their data path in an arbitrary order. None have function units that may be aggregated.


[0046] Those of ordinary skill in the art will recognize that the present invention has been described in terms of exemplary embodiments based upon the use of a particular architecture. However, the invention should not be so limited, since the present invention could be implemented using equivalent architectures. It will be further understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.


[0047] While the invention has been described in conjunction with specific embodiments, it is evident that many alternatives, modifications, permutations and variations will become apparent to those of ordinary skill in the art in light of the foregoing description. Accordingly, the present invention is intended to embrace all such alternatives, modifications and variations as fall within the scope of the appended claims.


Claims
  • 1. A re-configurable, streaming vector processor comprising: a plurality of function units, each having one or more inputs for receiving a data value and an output for providing a data value; a re-configurable interconnection switch comprising one or more links, each link operable to couple an output of a function unit to an input of the one or more inputs of a function unit; and a micro-sequencer coupled to the re-configurable interconnection switch and operable to control the re-configurable interconnection switch.
  • 2. A re-configurable, streaming vector processor in accordance with claim 1, wherein the micro-sequencer includes a program memory for storing a program of instructions.
  • 3. A re-configurable, streaming vector processor in accordance with claim 1, wherein the re-configurable interconnection switch includes a switch memory for storing data values.
  • 4. A re-configurable, streaming vector processor in accordance with claim 3, wherein the switch memory comprises at least one of a FIFO, a programmed delay and a pipelined register file.
  • 5. A re-configurable, streaming vector processor in accordance with claim 1, wherein a link of the re-configurable interconnection switch is directed by the micro-sequencer to receive a data value from an output of a function unit and to provide a data value to an input of the one or more inputs of a function unit.
  • 6. A re-configurable, streaming vector processor in accordance with claim 1, further comprising: one or more input stream units coupled to the re-configurable interconnection switch and operable to retrieve input data values from a data memory and to provide data values to the re-configurable interconnection switch; and one or more output stream units coupled to the re-configurable interconnection switch and operable to receive data values from the re-configurable interconnection switch and to provide output data values to data memory.
  • 7. A re-configurable, streaming vector processor in accordance with claim 6, wherein the input and output stream units include an interface for receiving control instructions from a host computer.
  • 8. A re-configurable, streaming vector processor in accordance with claim 7, wherein the control instructions comprises at least one of: a starting address of a vector of data values in the data memory; a span of the vector of data values; a stride between data values; a number of memory addresses to skip between a span of vector data values; and a size of each data value in the vector of data values.
  • 9. A re-configurable, streaming vector processor in accordance with claim 6, further comprising an external interface operable to couple to the input stream units, the output stream units and the micro-sequencer to a host computer.
  • 10. A re-configurable, streaming vector processor in accordance with claim 1, wherein the function units comprise at least one of: a shifter; an adder; a logic unit; and a multiplier.
  • 11. A re-configurable, streaming vector processor in accordance with claim 10, wherein the function units further comprise a passthrough function unit.
  • 12. A re-configurable, streaming vector processor in accordance with claim 1, wherein an output of at least one of the plurality of function units comprises a pipeline of registers.
  • 13. A re-configurable, streaming vector processor in accordance with claim 1, further comprising at least one accumulator coupled to the re-configurable interconnection switch.
  • 14. A re-configurable, streaming vector processor in accordance with claim 13, wherein the at least one accumulator is operable to be coupled to a host computer.
  • 15. A re-configurable, streaming vector processor in accordance with claim 1, further comprising a plurality of scalar registers.
  • 16. A re-configurable, streaming vector processor in accordance with claim 15, wherein the plurality of scalar registers provide a data tunnel.
  • 17. A method for configuring a streaming vector processor comprising an interconnection switch, a micro-sequencer and a plurality of function units, the method comprising: storing a program of instructions in the micro-sequencer; retrieving an instruction of the program of instructions; configuring the interconnection switch in accordance the instruction retrieved from the program of instructions; providing data stored in a first memory to a function unit in accordance the instruction received from the program of instructions; the function unit operating on the data; and storing data from a function unit in a second memory in accordance the instruction received from the program of instructions.
  • 18. A method in accordance with claim 17, wherein the streaming vector processor further comprises one or more input stream units having a buffer memory and wherein the first memory is one or more of the buffer memory of the input stream unit and a memory in the interconnection switch.
  • 19. A method in accordance with claim 18, the method further comprising each input stream unit retrieving data values from an external memory and storing them in the buffer memory of the input stream unit in accordance with a set parameters received from a host processor.
  • 20. A method in accordance with claim 17, wherein the streaming vector processor further comprises one or more output stream units having a buffer memory and wherein the second memory is one or more of the buffer memory of the output stream unit and a memory in the interconnection switch.
  • 21. A method in accordance with claim 20, further comprising each output stream unit writing data values from the buffer memory of the output stream unit to an external memory in accordance with a set parameters received from a host processor.
  • 22. A method for programming a streaming vector processor to perform an iterative computation, the streaming vector processor having a re-configurable data path and the method comprising: specifying a data-flow graph of an iteration of the iterative computation; generating, from the data-flow graph, a linear graph specifying a partially ordered set of operations corresponding to the data-flow graph; scheduling the linear graph onto the data path of the streaming vector processor; and generating binary code instructions operable to configure the data path of the streaming vector processor.
  • 23. A method in accordance with claim 22, wherein the streaming vector processor includes a micro-sequencer having a memory and the method further comprises storing the binary code instructions in the memory of the micro-sequencer.
  • 24. A method in accordance with claim 23, wherein the scheduling the linear graph and generating binary code instructions are performed by a computer.
  • 25. A method in accordance with claim 22, wherein the generating a linear graph further comprises specifying the data-flow graph using a graphical user interface to a computer and the computer automatically generating the linear graph from the data-flow graph.
CROSS REFERENCE TO RELATED APPLICATIONS

[0001] This application is related to co-pending patent applications titled “INTERCONNECTION DEVICE WITH INTEGRATED STORAGE” and identified by Attorney Docket No. CML00101D, “MEMORY INTERFACE WITH FRACTIONAL ADDRESSING” and identified by Attorney Docket No. CML00102D, “SCHEDULER FOR STREAMING VECTOR PROCESSOR” and identified by Attorney Docket No. CML00108D, “METHOD OF PROGRAMMING LINEAR GRAPHS FOR STREAMING VECTOR COMPUTATION” and identified by Attorney Docket No. CML00109D, which are filed on even day herewith and are hereby incorporated herein by reference.